Browse Source

万利达MES修改提交

caosy 4 years ago
parent
commit
3e9bb3cc1c

+ 6 - 4
UAS-MES/FunctionCode/Make/Make_ColorBoxLoadPrint.Designer.cs

@@ -28,6 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             this.ms_makecode_label = new System.Windows.Forms.Label();
             this.pr_code_label = new System.Windows.Forms.Label();
             this.mcd_okqty_label = new System.Windows.Forms.Label();
@@ -37,7 +38,7 @@
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.PrintLabel_label = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
-            this.PrintLabel = new UAS_MES.CustomControl.ComBoxWithFocus.ComboxWithTip();
+            this.PrintLabel = new UAS_MES.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
             this.ms_sncode = new System.Windows.Forms.Label();
             this.load = new System.Windows.Forms.RadioButton();
             this.unload = new System.Windows.Forms.RadioButton();
@@ -51,8 +52,8 @@
             this.ms_bomversion = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.code = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.Printer = new UAS_MES.CustomControl.ComBoxWithFocus.PrinterCombox();
-            this.mcd_remainqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel();
-            this.mcd_okqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel();
+            this.mcd_remainqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel(this.components);
+            this.mcd_okqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel(this.components);
             this.pr_code = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
@@ -111,7 +112,7 @@
             // 
             // ms_sncode_label
             // 
-            this.ms_sncode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.ms_sncode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -199,6 +200,7 @@
             this.unload.TabStop = true;
             this.unload.Text = "下料";
             this.unload.UseVisualStyleBackColor = true;
+            this.unload.Visible = false;
             // 
             // code_label
             // 

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs

@@ -213,9 +213,9 @@ namespace UAS_MES.Make
                                 string cm_status = dt.Rows[0]["cm_status"].ToString();
                                 string cm_makecode = dt.Rows[0]["cm_makecode"].ToString();
                                 string cm_craftcode = dt.Rows[0]["cm_craftcode"].ToString();
-                                sql.Clear();
-                                sql.Append("update makeserial set ms_nextstepcode=ms_stepcode where ms_id=" + oMsid);
-                                dh.ExecuteSql(sql.GetString(), "update");
+                                //sql.Clear();
+                                //sql.Append("update makeserial set ms_nextstepcode=ms_stepcode where ms_id=" + oMsid);
+                                //dh.ExecuteSql(sql.GetString(), "update");
                                 // 清除已被使用的序列号
                                 sql.Clear();
                                 sql.Append("update makeserial set ms_nextmacode='' where ms_sncode in(select cm_barcode from craftmaterial where ");

+ 2 - 2
UAS-MES/FunctionCode/Make/Make_FeedingCollection.resx

@@ -177,7 +177,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEwAACxMBAJqcGAAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEgAACxIB0t1+/AAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
@@ -308,7 +308,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEwAACxMBAJqcGAAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEgAACxIB0t1+/AAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B

+ 1 - 0
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -601,6 +601,7 @@ namespace UAS_MES.Make
                             SQLS.Add("update makeserial set  ms_spi = 0,ms_xray = 0,ms_checkpack = -1, ms_checkno='',ms_paststep = ms_paststep || case when instr(','||ms_paststep||',','" + User.CurrentStepCode + "')=0 then ','||'" + User.CurrentStepCode + "' end , ms_nextstepcode ='" + cd_stepcode.Text + "',ms_craftcode='" + cr_code.Text + "',ms_stepcode='" + User.CurrentStepCode + "',ms_reworkstatus=1 where ms_id='" + msid + "'");
                     }
                     SQLS.Add("update makebad set mb_status=-1 where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ms_makecode.Text + "'");
+                    SQLS.Add("update makebad set mb_enddate = sysdate where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ms_makecode.Text + "' and mb_enddate is null");
                     //取消最近拆解部件
                     SQLS.Add("update craftmaterial set cm_lastdeco=0 where cm_sncode='" + ms_sncode.Text + "' and cm_makecode='" + ms_makecode.Text + "' and nvl(cm_lastdeco,0)<>0");
                     dh.ExecuteSQLTran(SQLS.ToArray());

+ 17 - 15
UAS-MES/FunctionCode/Make/Make_SeqProgramTransform.cs

@@ -124,17 +124,17 @@ namespace UAS_MES.Make
                                     }
                                     //if (dt.Rows[0]["ms_stepcode"].ToString() == User.CurrentStepCode)
                                     //{
-                                        step = 1;
+                                    step = 1;
 
-                                        TSN = code.Text;
-                                        //显示序列号
-                                        show_sncode.Text = TSN;
-                                        ChangeResult.Enabled = false;
+                                    TSN = code.Text;
+                                    //显示序列号
+                                    show_sncode.Text = TSN;
+                                    ChangeResult.Enabled = false;
                                     //}
                                     //else
                                     //{
-                                        //OperateResult.AppendText("<<当前工序不允许重新转号\n", Color.Red, code);
-                                        //return;
+                                    //OperateResult.AppendText("<<当前工序不允许重新转号\n", Color.Red, code);
+                                    //return;
                                     //}
                                 }
                                 else
@@ -382,9 +382,9 @@ namespace UAS_MES.Make
             //将type中的mac和bt中的"-"和":"号去掉
             if (type == "MAC" || type == "BT")
             {
-                if (code.Text.Length > 40)
+                if (code.Text.Length > 100)
                 {
-                    macOrBt = code.Text.Substring(0, 40).Replace(":", "").Replace("-", "");
+                    macOrBt = code.Text.Substring(0, 100).Replace(":", "").Replace("-", "");
                 }
                 else
                 {
@@ -393,19 +393,19 @@ namespace UAS_MES.Make
             }
             else
             {
-                if (code.Text.Length > 40)
+                if (code.Text.Length > 100)
                 {
-                    imeif = code.Text.Substring(0, 40);
+                    imeif = code.Text.Substring(0, 100);
                 }
                 else
                 {
                     imeif = code.Text;
                 }
             }
-            if (code.Text.Length > 40)
+            if (code.Text.Length > 100)
             {
                 //如果前缀和长度都满足的话
-                if ((ListA.Rows[step - 2]["psr_length"].ToString() == "0" ? false : code.Text.Substring(0, 40).Length != int.Parse(ListA.Rows[step - 2]["psr_length"].ToString())))
+                if ((ListA.Rows[step - 2]["psr_length"].ToString() == "0" ? false : code.Text.Substring(0, 100).Length != int.Parse(ListA.Rows[step - 2]["psr_length"].ToString())))
                 {
                     OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"] + "长度需为" + ListA.Rows[step - 2]["psr_length"].ToString() + "校验不通过,请重新输入\n", Color.Red);
                     OperateResult.AppendText(">>请重新输入" + ListA.Rows[step - 2]["psr_type"] + "\n", Color.Black, code);
@@ -582,7 +582,8 @@ namespace UAS_MES.Make
                         }
                         LogicHandler.CollectRemarkInf(oMsid, "", "", Remark.Text);
                         OperateResult.AppendText(">>备注:" + Remark.Text + "\n", Color.Black);
-                        if (CollectRemark.Checked) {
+                        if (CollectRemark.Checked)
+                        {
                             Remark.Text = "";
                         }
                     }
@@ -830,7 +831,8 @@ namespace UAS_MES.Make
                         code.Focus();
                     }
                 }
-                catch {
+                catch
+                {
                     code.Enabled = true;
                     code.Focus();
                 }

+ 231 - 231
UAS-MES/FunctionCode/Make/Make_SmtTestCollection.Designer.cs

@@ -44,10 +44,16 @@
             this.mcd_inqty_label = new System.Windows.Forms.Label();
             this.mc_restqty_label = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
+            this.ob_sendqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.label7 = new System.Windows.Forms.Label();
             this.ob_checkno = new System.Windows.Forms.Label();
+            this.SendCheck = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.ob_batchqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.ob_batchqty_label = new System.Windows.Forms.Label();
+            this.ob_nowcheckqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.ob_nowcheckqty_label = new System.Windows.Forms.Label();
+            this.mcd_remainqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_inqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.ma_softversion_label = new System.Windows.Forms.Label();
             this.BadInfSource = new System.Windows.Forms.BindingSource(this.components);
@@ -57,7 +63,22 @@
             this.ma_salecode = new System.Windows.Forms.Label();
             this.pr_sendchecktype = new System.Windows.Forms.Label();
             this.MakeBadView = new System.Windows.Forms.DataGridView();
+            this.choose1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.mb_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mbr_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mb_badcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mb_badname = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mb_bgname = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mb_bgcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mbc_component = new System.Windows.Forms.DataGridViewComboBoxColumn();
+            this.mbp_part = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mbl_loc = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.WaitChooseDGV = new System.Windows.Forms.DataGridView();
+            this.ChooseAll = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.bc_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bc_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bg_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bg_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.badloc_label = new System.Windows.Forms.Label();
             this.mbp_part_label = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
@@ -78,30 +99,9 @@
             this.dataGridViewTextBoxColumn12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.psl_location = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.bd_soncode = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
-            this.ChooseAll = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.bc_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bc_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bg_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bg_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.choose1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.mb_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mbr_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mb_badcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mb_badname = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mb_bgname = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mb_bgcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mbc_component = new System.Windows.Forms.DataGridViewComboBoxColumn();
-            this.mbp_part = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mbl_loc = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.StepCount = new UAS_MES.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.Filter = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
             this.ma_softversion = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.ob_sendqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.SendCheck = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.ob_batchqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.ob_nowcheckqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.mcd_remainqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.mcd_inqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.Save = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.ma_code = new UAS_MES.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
             this.LockMakeCode = new UAS_MES.CustomControl.CustomCheckBox.LockCheckBox();
@@ -284,6 +284,19 @@
             this.panel1.Size = new System.Drawing.Size(315, 127);
             this.panel1.TabIndex = 71;
             // 
+            // ob_sendqty
+            // 
+            this.ob_sendqty.AutoSize = true;
+            this.ob_sendqty.CutLength = null;
+            this.ob_sendqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_sendqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_sendqty.Location = new System.Drawing.Point(109, 91);
+            this.ob_sendqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ob_sendqty.Name = "ob_sendqty";
+            this.ob_sendqty.Size = new System.Drawing.Size(0, 21);
+            this.ob_sendqty.TabIndex = 78;
+            this.ob_sendqty.Tag = "ob_batchqty";
+            // 
             // label7
             // 
             this.label7.AutoSize = true;
@@ -308,6 +321,39 @@
             this.ob_checkno.Visible = false;
             this.ob_checkno.TextChanged += new System.EventHandler(this.ob_checkno_TextChanged);
             // 
+            // SendCheck
+            // 
+            this.SendCheck.AllPower = null;
+            this.SendCheck.BackColor = System.Drawing.Color.Transparent;
+            this.SendCheck.DownImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.DownImage")));
+            this.SendCheck.Enabled = false;
+            this.SendCheck.Image = null;
+            this.SendCheck.IsShowBorder = true;
+            this.SendCheck.Location = new System.Drawing.Point(229, 90);
+            this.SendCheck.Margin = new System.Windows.Forms.Padding(2);
+            this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
+            this.SendCheck.Name = "SendCheck";
+            this.SendCheck.NormalImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.NormalImage")));
+            this.SendCheck.Power = null;
+            this.SendCheck.Size = new System.Drawing.Size(65, 26);
+            this.SendCheck.TabIndex = 72;
+            this.SendCheck.Text = "送检";
+            this.SendCheck.UseVisualStyleBackColor = false;
+            this.SendCheck.Click += new System.EventHandler(this.SendCheck_Click);
+            // 
+            // 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(109, 51);
+            this.ob_batchqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ob_batchqty.Name = "ob_batchqty";
+            this.ob_batchqty.Size = new System.Drawing.Size(0, 21);
+            this.ob_batchqty.TabIndex = 75;
+            this.ob_batchqty.Tag = "ob_batchqty";
+            // 
             // ob_batchqty_label
             // 
             this.ob_batchqty_label.AutoSize = true;
@@ -319,6 +365,19 @@
             this.ob_batchqty_label.TabIndex = 74;
             this.ob_batchqty_label.Text = "抽检批数";
             // 
+            // ob_nowcheckqty
+            // 
+            this.ob_nowcheckqty.AutoSize = true;
+            this.ob_nowcheckqty.CutLength = null;
+            this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_nowcheckqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(248, 51);
+            this.ob_nowcheckqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ob_nowcheckqty.Name = "ob_nowcheckqty";
+            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 21);
+            this.ob_nowcheckqty.TabIndex = 73;
+            this.ob_nowcheckqty.Tag = "ob_nowcheckqty";
+            // 
             // ob_nowcheckqty_label
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
@@ -330,6 +389,30 @@
             this.ob_nowcheckqty_label.TabIndex = 72;
             this.ob_nowcheckqty_label.Text = "当前批数";
             // 
+            // mcd_remainqty
+            // 
+            this.mcd_remainqty.AutoSize = true;
+            this.mcd_remainqty.CutLength = null;
+            this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_remainqty.Location = new System.Drawing.Point(109, 12);
+            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.mcd_remainqty.Name = "mcd_remainqty";
+            this.mcd_remainqty.Size = new System.Drawing.Size(0, 21);
+            this.mcd_remainqty.TabIndex = 57;
+            this.mcd_remainqty.Tag = "mcd_remainqty";
+            // 
+            // mcd_inqty
+            // 
+            this.mcd_inqty.AutoSize = true;
+            this.mcd_inqty.CutLength = null;
+            this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_inqty.Location = new System.Drawing.Point(248, 12);
+            this.mcd_inqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.mcd_inqty.Name = "mcd_inqty";
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 21);
+            this.mcd_inqty.TabIndex = 54;
+            this.mcd_inqty.Tag = "mcd_inqty";
+            // 
             // pr_detail_label
             // 
             this.pr_detail_label.AutoSize = true;
@@ -418,6 +501,92 @@
             this.MakeBadView.Size = new System.Drawing.Size(412, 223);
             this.MakeBadView.TabIndex = 195;
             // 
+            // choose1
+            // 
+            this.choose1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.choose1.HeaderText = "勾选";
+            this.choose1.MinimumWidth = 60;
+            this.choose1.Name = "choose1";
+            this.choose1.Width = 60;
+            // 
+            // mb_id
+            // 
+            this.mb_id.DataPropertyName = "mb_id";
+            this.mb_id.HeaderText = "mb_id";
+            this.mb_id.Name = "mb_id";
+            this.mb_id.Visible = false;
+            // 
+            // mbr_id
+            // 
+            this.mbr_id.DataPropertyName = "mbr_id";
+            this.mbr_id.HeaderText = "mbr_id";
+            this.mbr_id.Name = "mbr_id";
+            this.mbr_id.Visible = false;
+            // 
+            // mb_badcode
+            // 
+            this.mb_badcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.mb_badcode.DataPropertyName = "mb_badcode";
+            this.mb_badcode.HeaderText = "不良代码";
+            this.mb_badcode.MinimumWidth = 80;
+            this.mb_badcode.Name = "mb_badcode";
+            this.mb_badcode.ReadOnly = true;
+            this.mb_badcode.Width = 80;
+            // 
+            // mb_badname
+            // 
+            this.mb_badname.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.mb_badname.DataPropertyName = "mb_badname";
+            this.mb_badname.HeaderText = "不良名称";
+            this.mb_badname.MinimumWidth = 80;
+            this.mb_badname.Name = "mb_badname";
+            this.mb_badname.ReadOnly = true;
+            this.mb_badname.Width = 80;
+            // 
+            // mb_bgname
+            // 
+            this.mb_bgname.DataPropertyName = "mb_bgname";
+            this.mb_bgname.HeaderText = "不良代码组描述";
+            this.mb_bgname.Name = "mb_bgname";
+            this.mb_bgname.Visible = false;
+            // 
+            // mb_bgcode
+            // 
+            this.mb_bgcode.DataPropertyName = "mb_bgcode";
+            this.mb_bgcode.HeaderText = "不良代码组编号";
+            this.mb_bgcode.Name = "mb_bgcode";
+            this.mb_bgcode.Visible = false;
+            // 
+            // mbc_component
+            // 
+            this.mbc_component.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.mbc_component.DataPropertyName = "mbc_component";
+            this.mbc_component.HeaderText = "不良组件";
+            this.mbc_component.Items.AddRange(new object[] {
+            "",
+            "主板",
+            "液晶屏",
+            "电路板",
+            "其他"});
+            this.mbc_component.MinimumWidth = 80;
+            this.mbc_component.Name = "mbc_component";
+            this.mbc_component.Width = 80;
+            // 
+            // mbp_part
+            // 
+            this.mbp_part.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.mbp_part.DataPropertyName = "mbp_part";
+            this.mbp_part.HeaderText = "不良零件";
+            this.mbp_part.Name = "mbp_part";
+            // 
+            // mbl_loc
+            // 
+            this.mbl_loc.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.mbl_loc.DataPropertyName = "mbl_loc";
+            this.mbl_loc.HeaderText = "不良位置";
+            this.mbl_loc.MinimumWidth = 45;
+            this.mbl_loc.Name = "mbl_loc";
+            // 
             // WaitChooseDGV
             // 
             this.WaitChooseDGV.AllowUserToAddRows = false;
@@ -437,6 +606,45 @@
             this.WaitChooseDGV.Size = new System.Drawing.Size(235, 223);
             this.WaitChooseDGV.TabIndex = 208;
             // 
+            // ChooseAll
+            // 
+            this.ChooseAll.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.ChooseAll.HeaderText = "勾选";
+            this.ChooseAll.MinimumWidth = 80;
+            this.ChooseAll.Name = "ChooseAll";
+            this.ChooseAll.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.ChooseAll.Width = 80;
+            // 
+            // bc_code
+            // 
+            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;
+            this.bc_name.Width = 130;
+            // 
+            // bg_code
+            // 
+            this.bg_code.DataPropertyName = "bg_code";
+            this.bg_code.HeaderText = "不良组别编号";
+            this.bg_code.Name = "bg_code";
+            this.bg_code.Visible = false;
+            // 
+            // bg_name
+            // 
+            this.bg_name.DataPropertyName = "bg_name";
+            this.bg_name.HeaderText = "不良组别名称";
+            this.bg_name.Name = "bg_name";
+            this.bg_name.Visible = false;
+            // 
             // badloc_label
             // 
             this.badloc_label.AutoSize = true;
@@ -631,131 +839,6 @@
             this.bd_soncode.Tag = "psl_prodcode";
             this.bd_soncode.TextBoxEnable = true;
             // 
-            // ChooseAll
-            // 
-            this.ChooseAll.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.ChooseAll.HeaderText = "勾选";
-            this.ChooseAll.MinimumWidth = 80;
-            this.ChooseAll.Name = "ChooseAll";
-            this.ChooseAll.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.ChooseAll.Width = 80;
-            // 
-            // bc_code
-            // 
-            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;
-            this.bc_name.Width = 130;
-            // 
-            // bg_code
-            // 
-            this.bg_code.DataPropertyName = "bg_code";
-            this.bg_code.HeaderText = "不良组别编号";
-            this.bg_code.Name = "bg_code";
-            this.bg_code.Visible = false;
-            // 
-            // bg_name
-            // 
-            this.bg_name.DataPropertyName = "bg_name";
-            this.bg_name.HeaderText = "不良组别名称";
-            this.bg_name.Name = "bg_name";
-            this.bg_name.Visible = false;
-            // 
-            // choose1
-            // 
-            this.choose1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.choose1.HeaderText = "勾选";
-            this.choose1.MinimumWidth = 60;
-            this.choose1.Name = "choose1";
-            this.choose1.Width = 60;
-            // 
-            // mb_id
-            // 
-            this.mb_id.DataPropertyName = "mb_id";
-            this.mb_id.HeaderText = "mb_id";
-            this.mb_id.Name = "mb_id";
-            this.mb_id.Visible = false;
-            // 
-            // mbr_id
-            // 
-            this.mbr_id.DataPropertyName = "mbr_id";
-            this.mbr_id.HeaderText = "mbr_id";
-            this.mbr_id.Name = "mbr_id";
-            this.mbr_id.Visible = false;
-            // 
-            // mb_badcode
-            // 
-            this.mb_badcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.mb_badcode.DataPropertyName = "mb_badcode";
-            this.mb_badcode.HeaderText = "不良代码";
-            this.mb_badcode.MinimumWidth = 80;
-            this.mb_badcode.Name = "mb_badcode";
-            this.mb_badcode.ReadOnly = true;
-            this.mb_badcode.Width = 80;
-            // 
-            // mb_badname
-            // 
-            this.mb_badname.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.mb_badname.DataPropertyName = "mb_badname";
-            this.mb_badname.HeaderText = "不良名称";
-            this.mb_badname.MinimumWidth = 80;
-            this.mb_badname.Name = "mb_badname";
-            this.mb_badname.ReadOnly = true;
-            this.mb_badname.Width = 80;
-            // 
-            // mb_bgname
-            // 
-            this.mb_bgname.DataPropertyName = "mb_bgname";
-            this.mb_bgname.HeaderText = "不良代码组描述";
-            this.mb_bgname.Name = "mb_bgname";
-            this.mb_bgname.Visible = false;
-            // 
-            // mb_bgcode
-            // 
-            this.mb_bgcode.DataPropertyName = "mb_bgcode";
-            this.mb_bgcode.HeaderText = "不良代码组编号";
-            this.mb_bgcode.Name = "mb_bgcode";
-            this.mb_bgcode.Visible = false;
-            // 
-            // mbc_component
-            // 
-            this.mbc_component.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.mbc_component.DataPropertyName = "mbc_component";
-            this.mbc_component.HeaderText = "不良组件";
-            this.mbc_component.Items.AddRange(new object[] {
-            "",
-            "主板",
-            "液晶屏",
-            "电路板",
-            "其他"});
-            this.mbc_component.MinimumWidth = 80;
-            this.mbc_component.Name = "mbc_component";
-            this.mbc_component.Width = 80;
-            // 
-            // mbp_part
-            // 
-            this.mbp_part.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.mbp_part.DataPropertyName = "mbp_part";
-            this.mbp_part.HeaderText = "不良零件";
-            this.mbp_part.Name = "mbp_part";
-            // 
-            // mbl_loc
-            // 
-            this.mbl_loc.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.mbl_loc.DataPropertyName = "mbl_loc";
-            this.mbl_loc.HeaderText = "不良位置";
-            this.mbl_loc.MinimumWidth = 45;
-            this.mbl_loc.Name = "mbl_loc";
-            // 
             // StepCount
             // 
             this.StepCount.LineCode = null;
@@ -791,89 +874,6 @@
             this.ma_softversion.Size = new System.Drawing.Size(0, 21);
             this.ma_softversion.TabIndex = 73;
             // 
-            // ob_sendqty
-            // 
-            this.ob_sendqty.AutoSize = true;
-            this.ob_sendqty.CutLength = null;
-            this.ob_sendqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_sendqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_sendqty.Location = new System.Drawing.Point(109, 91);
-            this.ob_sendqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ob_sendqty.Name = "ob_sendqty";
-            this.ob_sendqty.Size = new System.Drawing.Size(0, 21);
-            this.ob_sendqty.TabIndex = 78;
-            this.ob_sendqty.Tag = "ob_batchqty";
-            // 
-            // SendCheck
-            // 
-            this.SendCheck.AllPower = null;
-            this.SendCheck.BackColor = System.Drawing.Color.Transparent;
-            this.SendCheck.DownImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.DownImage")));
-            this.SendCheck.Enabled = false;
-            this.SendCheck.Image = null;
-            this.SendCheck.IsShowBorder = true;
-            this.SendCheck.Location = new System.Drawing.Point(229, 90);
-            this.SendCheck.Margin = new System.Windows.Forms.Padding(2);
-            this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
-            this.SendCheck.Name = "SendCheck";
-            this.SendCheck.NormalImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.NormalImage")));
-            this.SendCheck.Power = null;
-            this.SendCheck.Size = new System.Drawing.Size(65, 26);
-            this.SendCheck.TabIndex = 72;
-            this.SendCheck.Text = "送检";
-            this.SendCheck.UseVisualStyleBackColor = false;
-            this.SendCheck.Click += new System.EventHandler(this.SendCheck_Click);
-            // 
-            // 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(109, 51);
-            this.ob_batchqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ob_batchqty.Name = "ob_batchqty";
-            this.ob_batchqty.Size = new System.Drawing.Size(0, 21);
-            this.ob_batchqty.TabIndex = 75;
-            this.ob_batchqty.Tag = "ob_batchqty";
-            // 
-            // ob_nowcheckqty
-            // 
-            this.ob_nowcheckqty.AutoSize = true;
-            this.ob_nowcheckqty.CutLength = null;
-            this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(248, 51);
-            this.ob_nowcheckqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ob_nowcheckqty.Name = "ob_nowcheckqty";
-            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 21);
-            this.ob_nowcheckqty.TabIndex = 73;
-            this.ob_nowcheckqty.Tag = "ob_nowcheckqty";
-            // 
-            // mcd_remainqty
-            // 
-            this.mcd_remainqty.AutoSize = true;
-            this.mcd_remainqty.CutLength = null;
-            this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty.Location = new System.Drawing.Point(109, 12);
-            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(0, 21);
-            this.mcd_remainqty.TabIndex = 57;
-            this.mcd_remainqty.Tag = "mcd_remainqty";
-            // 
-            // mcd_inqty
-            // 
-            this.mcd_inqty.AutoSize = true;
-            this.mcd_inqty.CutLength = null;
-            this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty.Location = new System.Drawing.Point(248, 12);
-            this.mcd_inqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.mcd_inqty.Name = "mcd_inqty";
-            this.mcd_inqty.Size = new System.Drawing.Size(0, 21);
-            this.mcd_inqty.TabIndex = 54;
-            this.mcd_inqty.Tag = "mcd_inqty";
-            // 
             // Save
             // 
             this.Save.AllPower = null;
@@ -1094,12 +1094,12 @@
             this.Load += new System.EventHandler(this.TestCollection_Load);
             this.SizeChanged += new System.EventHandler(this.测试采集_SizeChanged);
             this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Make_TestCollection_KeyDown);
-            this.panel1.ResumeLayout(true);
+            this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.MakeBadView)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.WaitChooseDGV)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }

+ 12 - 1
UAS-MES/FunctionCode/Make/Make_SmtTestCollection.cs

@@ -342,6 +342,11 @@ namespace UAS_MES.Make
             }
             else if (GoodProduct.Checked)
             {
+                if (ms_sncode.Text.StartsWith("SAD"))
+                {
+                    dh.ExecuteSql("update makeserial set MS_IFX = -1 where ms_sncode = '" + ms_sncode.Text + "' and ms_makecode = '" + ma_code.Text + "'", "update");
+                }
+
                 //如果不是返修的
                 if (ifrework == "0")
                 {
@@ -422,6 +427,11 @@ namespace UAS_MES.Make
                 ms_code_KeyDown(sender, new KeyEventArgs(Keys.Enter));
             else if (Reject.Checked)
             {
+                if (ms_sncode.Text.StartsWith("SAD"))
+                {
+                    OperateResult.AppendText(">>SAD开头SN不允许采集不良\n", Color.Red, ms_sncode);
+                    return;
+                }
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
                     //判断界面工单是否为空时的序列号是否自动归属工单
@@ -551,7 +561,8 @@ namespace UAS_MES.Make
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "采集成不良", "测试不良", ms_sncode.Text, ob_checkno.Text);
                 }
                 //不良信息采集,mb_status<>0的是之前维修保存的,不能删除
-                dh.ExecuteSql("delete from makebad where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "' and nvl(mb_status,0)=0", "delete");
+             
+                    dh.ExecuteSql("delete from makebad where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "' and nvl(mb_status,0)=0", "delete");
                 if (LogicHandler.SetTestNGDetail(ms_sncode.Text, ma_code.Text, User.UserCode, User.UserSourceCode, "检查未通过", bgcode.ToArray(), bccode.ToArray(), bgname.ToArray(), bcname.ToArray(), bcremark.ToArray(), out ErrorMessage))
                 {
                     OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_SmtbdTestCollection.cs

@@ -545,7 +545,7 @@ namespace UAS_MES.Make
                         dh.UpdateByCondition("steppassed", "sp_result='不良品',sp_ifng=-1,sp_ymd=to_char(sysdate,'yyyymmdd'),sp_hm=to_char(sysdate,'hh24miss')", "sp_id=(select max(sp_id) from steppassed where sp_sncode='" + ms_sncode.Text + "')");
                         dh.UpdateByCondition("makecraftdetail", "mcd_okqty=mcd_okqty-1", "mcd_macode='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
                         dh.UpdateByCondition("makeserial", "ms_nextstepcode='',ms_badtimes=nvl(ms_badtimes,0)+1", "ms_id='" + oMSID + "'");
-                        LogicHandler.InsertMakeProcess(ms_sncode.Text, ma_code.Text, UserSourceCode, "良品采集成不良", "测试不良", User.UserCode);
+                        LogicHandler.InsertMakeProcess(ms_sncode.Text, ma_code.Text, User.UserSourceCode, "良品采集成不良", "测试不良", User.UserCode);
                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, UserSourceCode, "测试不良", "良品采集成不良", ms_sncode.Text, ob_checkno.Text);
                     }
                     string checkno = dt.Rows[0]["ms_checkno"].ToString();
@@ -555,12 +555,12 @@ namespace UAS_MES.Make
                 }
                 else
                 {
-                    LogicHandler.InsertMakeProcess(ms_sncode.Text, ma_code.Text, UserSourceCode, "采集成不良", "测试不良", User.UserCode);
+                    LogicHandler.InsertMakeProcess(ms_sncode.Text, ma_code.Text, User.UserSourceCode, "采集成不良", "测试不良", User.UserCode);
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode,UserSourceCode, "采集成不良", "测试不良", ms_sncode.Text, ob_checkno.Text);
                 }
                 //不良信息采集,mb_status<>0的是之前维修保存的,不能删除
                 dh.ExecuteSql("delete from makebad where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "' and nvl(mb_status,0)=0", "delete");
-                if (LogicHandler.SetTestNGDetail(ms_sncode.Text, ma_code.Text, User.UserCode, UserSourceCode, "检查未通过", bgcode.ToArray(), bccode.ToArray(), bgname.ToArray(), bcname.ToArray(), bcremark.ToArray(), out ErrorMessage))
+                if (LogicHandler.SetTestNGDetail(ms_sncode.Text, ma_code.Text, User.UserCode, User.UserSourceCode, "检查未通过", bgcode.ToArray(), bccode.ToArray(), bgname.ToArray(), bcname.ToArray(), bcremark.ToArray(), out ErrorMessage))
                 {
                     OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
 

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_XrayTestCollection.cs

@@ -737,7 +737,7 @@ namespace UAS_MES.Make
                                 SQLS.Add("update makeserial set ms_status='2' where ms_id='" + ms_id + "'");
                         }
                     }
-                    SQLS.Add("update makebad set mb_status=-1 where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "' and MB_STEPCODE = '" + User.CurrentStepCode + "'");
+                    SQLS.Add("update makebad set mb_status=-1,mb_enddate = sysdate where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "' and MB_STEPCODE = '" + User.CurrentStepCode + "'");
                     dh.ExecuteSQLTran(SQLS.ToArray());
                     //保存不良原因
                     LastSncode = ms_sncode.Text;

+ 4 - 4
UAS-MES/PublicMethod/LogicHandler.cs

@@ -538,10 +538,10 @@ namespace UAS_MES.PublicMethod
             //更新完工数量
             ExeSQL.Add("update make set ma_madeqty=(select count(1) from makeserial where ms_makecode='" + iMakeCode + "' and ms_status=2) where ma_code='" + iMakeCode + "'");
             //删除StepPassed数据
-            //sql.Clear();
-            //sql.Append("delete from steppassed where sp_sncode in (select v_barcode from mes_package_view where v_outboxcode='" + iOutBoxCode + "') ");
-            //sql.Append("and sp_makecode='" + iMakeCode + "' and sp_stepcode='" + CurrentStep + "'");
-            //ExeSQL.Add(sql.ToString());
+            sql.Clear();
+            sql.Append("delete from steppassed where sp_sncode in (select v_barcode from mes_package_view where v_outboxcode='" + iOutBoxCode + "') ");
+            sql.Append("and sp_makecode='" + iMakeCode + "' and sp_stepcode='" + CurrentStep + "'");
+            ExeSQL.Add(sql.ToString());
             //更新大箱或栈板的母箱编号为空
             ExeSQL.Add("update package set pa_mothercode='' where pa_outboxcode in(select PD_INNERBOXCODE from package left join packagedetail on pa_id=pd_paid where pa_outboxcode='" + iOutBoxCode + "')");
             //删除从表明细

+ 20 - 13
UAS-MES/UAS-MES.csproj

@@ -38,11 +38,11 @@
     <ProductName>优软MES系统</ProductName>
     <PublisherName>深圳市优软科技有限公司</PublisherName>
     <SuiteName>优软MES系统</SuiteName>
-    <MinimumRequiredVersion>1.0.0.606</MinimumRequiredVersion>
+    <MinimumRequiredVersion>1.0.0.725</MinimumRequiredVersion>
     <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
     <WebPage>publish.htm</WebPage>
     <OpenBrowserOnPublish>false</OpenBrowserOnPublish>
-    <ApplicationRevision>607</ApplicationRevision>
+    <ApplicationRevision>725</ApplicationRevision>
     <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
     <UseApplicationTrust>true</UseApplicationTrust>
     <CreateDesktopShortcut>true</CreateDesktopShortcut>
@@ -605,18 +605,18 @@
     <Compile Include="FunctionCode\Make\Make_SeqProgramTransform.Designer.cs">
       <DependentUpon>Make_SeqProgramTransform.cs</DependentUpon>
     </Compile>
-    <Compile Include="FunctionCode\Make\Make_SMTStockStencil.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="FunctionCode\Make\Make_SMTStockStencil.Designer.cs">
-      <DependentUpon>Make_SMTStockStencil.cs</DependentUpon>
-    </Compile>
     <Compile Include="FunctionCode\Make\Make_SMTStencil.cs">
       <SubType>Form</SubType>
     </Compile>
     <Compile Include="FunctionCode\Make\Make_SMTStencil.Designer.cs">
       <DependentUpon>Make_SMTStencil.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_SMTStockStencil.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_SMTStockStencil.Designer.cs">
+      <DependentUpon>Make_SMTStockStencil.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_SmtTestCollection.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -629,6 +629,12 @@
     <Compile Include="FunctionCode\Make\Make_SpecialCartonPack.Designer.cs">
       <DependentUpon>Make_SpecialCartonPack.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_SmtbdTestCollection.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_SmtbdTestCollection.Designer.cs">
+      <DependentUpon>Make_SmtbdTestCollection.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_SpiTestCollection.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1238,18 +1244,21 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_SeqProgramTransform.resx">
       <DependentUpon>Make_SeqProgramTransform.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="FunctionCode\Make\Make_SMTStockStencil.resx">
-      <DependentUpon>Make_SMTStockStencil.cs</DependentUpon>
-    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_SMTStencil.resx">
       <DependentUpon>Make_SMTStencil.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_SMTStockStencil.resx">
+      <DependentUpon>Make_SMTStockStencil.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_SmtTestCollection.resx">
       <DependentUpon>Make_SmtTestCollection.cs</DependentUpon>
     </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_SpecialCartonPack.resx">
       <DependentUpon>Make_SpecialCartonPack.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_SmtbdTestCollection.resx">
+      <DependentUpon>Make_SmtbdTestCollection.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_SpiTestCollection.resx">
       <DependentUpon>Make_SpiTestCollection.cs</DependentUpon>
     </EmbeddedResource>
@@ -1276,7 +1285,6 @@
     </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Query\Query_MakeInf.resx">
       <DependentUpon>Query_MakeInf.cs</DependentUpon>
-      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Query\Query_SnMessage.resx">
       <DependentUpon>Query_SnMessage.cs</DependentUpon>
@@ -1360,7 +1368,6 @@
     </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_PositionStock.resx">
       <DependentUpon>Make_PositionStock.cs</DependentUpon>
-      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_CheckNoRelpace.resx">
       <DependentUpon>Make_CheckNoRelpace.cs</DependentUpon>