caosy 2 лет назад
Родитель
Сommit
b74f446123
49 измененных файлов с 1223 добавлено и 376 удалено
  1. 1 1
      UAS_MES_ZT/App.config
  2. 189 0
      UAS_MES_ZT/CustomControl/RichText/RichTextAutoBottom.cs
  3. 1 1
      UAS_MES_ZT/FunctionCode/Make/Make_Aging.cs
  4. 1 1
      UAS_MES_ZT/FunctionCode/Make/Make_AgingOver.cs
  5. 4 4
      UAS_MES_ZT/FunctionCode/Make/Make_Decompose.Designer.cs
  6. 1 1
      UAS_MES_ZT/FunctionCode/Make/Make_Decompose.cs
  7. 0 19
      UAS_MES_ZT/FunctionCode/Make/Make_FeedingCollection.cs
  8. 7 7
      UAS_MES_ZT/FunctionCode/Make/Make_RepairOk.cs
  9. 1 1
      UAS_MES_ZT/FunctionCode/Make/Make_SeqTransform.cs
  10. 23 1
      UAS_MES_ZT/FunctionCode/Make/Make_TestCollection.cs
  11. 4 4
      UAS_MES_ZT/FunctionCode/OQC/OQC_BatchResultJudge.cs
  12. 1 1
      UAS_MES_ZT/FunctionCode/OQC/OQC_SamplingDataCollection.cs
  13. 16 2
      UAS_MES_ZT/FunctionCode/Packing/Packing_CartonSplit.cs
  14. 127 97
      UAS_MES_ZT/FunctionCode/Packing/Packing_CartonTransfer.Designer.cs
  15. 21 5
      UAS_MES_ZT/FunctionCode/Packing/Packing_CartonTransfer.cs
  16. 84 121
      UAS_MES_ZT/FunctionCode/Packing/Packing_PackageCollection.Designer.cs
  17. 3 3
      UAS_MES_ZT/FunctionCode/Packing/Packing_PackageCollection.cs
  18. 3 3
      UAS_MES_ZT/FunctionCode/Packing/Packing_PackageCollectionWeigh.cs
  19. 13 7
      UAS_MES_ZT/FunctionCode/Query/BadItem.Designer.cs
  20. 46 3
      UAS_MES_ZT/FunctionCode/Query/BadItem.cs
  21. 122 0
      UAS_MES_ZT/FunctionCode/Query/BadSn.Designer.cs
  22. 84 0
      UAS_MES_ZT/FunctionCode/Query/BadSn.cs
  23. 138 0
      UAS_MES_ZT/FunctionCode/Query/BadSn.resx
  24. 97 21
      UAS_MES_ZT/FunctionCode/Query/Query_DateRate.Designer.cs
  25. 61 1
      UAS_MES_ZT/FunctionCode/Query/Query_DateRate.cs
  26. 39 1
      UAS_MES_ZT/FunctionCode/Query/Query_DateRate.resx
  27. 27 5
      UAS_MES_ZT/FunctionCode/Special/Special_ReSNBD.cs
  28. 2 2
      UAS_MES_ZT/FunctionCode/Warehouse/Warehouse_FinishedProductOut.Designer.cs
  29. 18 0
      UAS_MES_ZT/FunctionCode/Warehouse/Warehouse_FinishedProductOut.resx
  30. 21 18
      UAS_MES_ZT/FunctionCode/Warehouse/Warehouse_ProdDetail.Designer.cs
  31. 3 3
      UAS_MES_ZT/FunctionCode/Warehouse/Warehouse_ProdDetail.cs
  32. 1 1
      UAS_MES_ZT/FunctionCode/Warehouse/Warehouse_ProdDetail.resx
  33. 38 36
      UAS_MES_ZT/FunctionCode/Warehouse/Warehouse_ProductMakeIn.Designer.cs
  34. 2 2
      UAS_MES_ZT/Login.cs
  35. 1 1
      UAS_MES_ZT/Properties/Settings.settings
  36. 2 3
      UAS_MES_ZT/Properties/Settings1.Designer.cs
  37. 1 0
      UAS_MES_ZT/PublicMethod/LogicHandler.cs
  38. BIN
      UAS_MES_ZT/Resources/Sound/上料成功.wav
  39. BIN
      UAS_MES_ZT/Resources/Sound/已封箱.wav
  40. BIN
      UAS_MES_ZT/Resources/Sound/强制批过.wav
  41. BIN
      UAS_MES_ZT/Resources/Sound/强制批退.wav
  42. BIN
      UAS_MES_ZT/Resources/Sound/打印.wav
  43. BIN
      UAS_MES_ZT/Resources/Sound/批过.wav
  44. BIN
      UAS_MES_ZT/Resources/Sound/批退.wav
  45. BIN
      UAS_MES_ZT/Resources/Sound/老化开始.wav
  46. BIN
      UAS_MES_ZT/Resources/Sound/老化结束.wav
  47. BIN
      UAS_MES_ZT/Resources/Sound/转码成功.wav
  48. BIN
      UAS_MES_ZT/Resources/Sound/重新转码成功.wav
  49. 20 0
      UAS_MES_ZT/UAS_MES_ZT.csproj

+ 1 - 1
UAS_MES_ZT/App.config

@@ -72,7 +72,7 @@
   <applicationSettings>
     <UAS_MES_NEW.Properties.Settings>
       <setting name="MES" serializeAs="String">
-        <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES_ZTRH;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=usoft.f3322.net)(PORT=11659)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
+        <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES_ZTRH;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.66.6)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
       </setting>
     </UAS_MES_NEW.Properties.Settings>
   </applicationSettings>

+ 189 - 0
UAS_MES_ZT/CustomControl/RichText/RichTextAutoBottom.cs

@@ -105,6 +105,69 @@ namespace UAS_MES_NEW.CustomControl.RichText
                 thread.Start();
                 thread = new Thread(PlaySound);
             }
+            else if (color == Color.Aqua && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\打印.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.Aquamarine && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\批过.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.Brown && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\批退.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.Chartreuse && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\强制批过.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.Crimson && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\强制批退.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.ForestGreen && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\已封箱.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.LawnGreen && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\转码成功.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.CornflowerBlue && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\老化开始.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.LightGreen && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\老化结束.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
             LogManager.DoLog(FindForm().Tag + str);
         }
 
@@ -150,6 +213,69 @@ namespace UAS_MES_NEW.CustomControl.RichText
                 thread.Start();
                 thread = new Thread(PlaySound);
             }
+            else if (color == Color.Aqua && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\打印.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.Aquamarine && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\批过.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.Brown && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\批退.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.Chartreuse && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\强制批过.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.Crimson && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\强制批退.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.ForestGreen && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\已封箱.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.LawnGreen && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\转码成功.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.CornflowerBlue && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\老化开始.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.LightGreen && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\老化结束.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
             LogManager.DoLog(FindForm().Tag + str);
         }
 
@@ -195,6 +321,69 @@ namespace UAS_MES_NEW.CustomControl.RichText
                 thread.Start();
                 thread = new Thread(PlaySound);
             }
+            else if (color == Color.Aqua && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\打印.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.Aquamarine && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\批过.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.Brown && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\批退.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.Chartreuse && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\强制批过.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.Crimson && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\强制批退.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.ForestGreen && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\已封箱.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.LawnGreen && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\转码成功.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.CornflowerBlue && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\老化开始.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.LightGreen && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\老化结束.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
             LogManager.DoLog(FindForm().Tag + str);
         }
 

+ 1 - 1
UAS_MES_ZT/FunctionCode/Make/Make_Aging.cs

@@ -226,7 +226,7 @@ namespace UAS_MES_NEW.Make
                     {
                         dh.ExecuteSql("update ageing set ag_startdate = sysdate,ag_status = 1 where ag_code = '" + agcode.Text + "'", "update");
                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "老化开始" + agcode.Text, "采集开始", agcode.Text, "");
-                        OperateResult.AppendText(">>" + agcode.Text + "老化批次开始\n", Color.Green, agcode);
+                        OperateResult.AppendText(">>" + agcode.Text + "老化批次开始\n", Color.CornflowerBlue, agcode);
                         BaseUtil.CleanControls(this.Controls);
                         if (!checkBox1.Checked)
                         {

+ 1 - 1
UAS_MES_ZT/FunctionCode/Make/Make_AgingOver.cs

@@ -114,7 +114,7 @@ namespace UAS_MES_NEW.Make
                         }
                         dh.ExecuteSql("update ageing set ag_enddate = sysdate,ag_status = 2 where ag_code = '" + agcode.Text + "'", "update");
                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "老化结束" + agcode.Text, "采集结束", agcode.Text, "");
-                        OperateResult.AppendText(">>" + agcode.Text + "老化批次结束\n", Color.Green, agcode);
+                        OperateResult.AppendText(">>" + agcode.Text + "老化批次结束\n", Color.CornflowerBlue, agcode);
                         BaseUtil.CleanControls(this.Controls);
                         agcode.Focus();
                     }

+ 4 - 4
UAS_MES_ZT/FunctionCode/Make/Make_Decompose.Designer.cs

@@ -204,7 +204,7 @@
             this.cm_maprodcode,
             this.cm_sncode});
             this.LabelDataGridView.Location = new System.Drawing.Point(18, 153);
-            this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(4);
             this.LabelDataGridView.Name = "LabelDataGridView";
             this.LabelDataGridView.RowHeadersVisible = false;
             this.LabelDataGridView.RowTemplate.Height = 23;
@@ -217,7 +217,7 @@
             // 
             this.change.AutoSize = true;
             this.change.Location = new System.Drawing.Point(1096, 120);
-            this.change.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.change.Margin = new System.Windows.Forms.Padding(4);
             this.change.Name = "change";
             this.change.Size = new System.Drawing.Size(105, 22);
             this.change.TabIndex = 193;
@@ -229,7 +229,7 @@
             // 
             this.nochange.AutoSize = true;
             this.nochange.Location = new System.Drawing.Point(1096, 86);
-            this.nochange.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.nochange.Margin = new System.Windows.Forms.Padding(4);
             this.nochange.Name = "nochange";
             this.nochange.Size = new System.Drawing.Size(69, 22);
             this.nochange.TabIndex = 194;
@@ -874,7 +874,7 @@
             this.Controls.Add(this.pa_makecode_label);
             this.Controls.Add(this.OperateResult);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_Decompose";
             this.Tag = "Make!Decompose";
             this.Text = "拆解处理";

+ 1 - 1
UAS_MES_ZT/FunctionCode/Make/Make_Decompose.cs

@@ -111,7 +111,7 @@ namespace UAS_MES_NEW.Make
             sncode_1 = sncode;
             sql.Clear();
             sql.Append("select cm_inqty,cm_craftcode,cm_spid,cm_craftname,cm_firstsn,cm_makecode,cm_stepcode,cm_stepname,cm_maprodcode,cm_fsoncode,cm_wccode,cm_maid,cm_soncode,cm_materialtype,");
-            sql.Append("max(cm_status) cm_status,max(cm_id) cm_id from craftmaterial where(cm_sncode  in (select '" + sncode_1 + "' from dual union select firstsn from makesnrelation where sn ");
+            sql.Append("max(cm_status) cm_status,max(cm_id) cm_id from craftmaterial where CM_MATERIALTYPE = 1 and (cm_sncode  in (select '" + sncode_1 + "' from dual union select firstsn from makesnrelation where sn ");
             sql.Append(" ='" + sncode_1 + "'union  select sn from makesnrelation where firstsn = '" + sncode_1 + "')");
             sql.Append(") group by cm_inqty,cm_craftcode,cm_firstsn,cm_stepcode,cm_stepname,cm_spid,cm_makecode,cm_maprodcode,cm_maid,cm_soncode,cm_wccode,cm_materialtype,cm_craftname,cm_fsoncode ORDER BY cm_status DESC");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");

+ 0 - 19
UAS_MES_ZT/FunctionCode/Make/Make_FeedingCollection.cs

@@ -525,25 +525,6 @@ namespace UAS_MES_NEW.Make
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "上料采集", "上料成功", sn_code.Text, "");
                 if (LogicHandler.SetStepResult(ma_code, User.UserSourceCode, sn_code.Text, "上料采集", "上料成功", User.UserCode, out ErrorMessage))
                 {
-                    //replacestring; ma_prodcode.Text
-                    dt = (DataTable)dh.ExecuteSql("select pr_relocation from product where pr_code = '" + ma_prodcode.Text + "' and pr_ifreplace = -1", "select");
-                    if (dt.Rows.Count > 0 && replacestring != "")
-                    {
-                        string newsncode = sn_code.Text.Remove(int.Parse(dt.Rows[0]["pr_relocation"].ToString())-1, 1);
-                        newsncode = newsncode.Insert(int.Parse(dt.Rows[0]["pr_relocation"].ToString())-1, replacestring);
-                        if (dh.CheckExist("MAKESNRELATION", "FIRSTSN = '" + ms_firstsn + "' AND MAKECODE = '"+ ma_code + "'"))
-                        {
-                            dh.ExecuteSql("update MAKESNRELATION set sn = '"+ newsncode + "' where FIRSTSN = '" + ms_firstsn + "' AND MAKECODE = '" + ma_code + "'", "update");
-                        }
-                        else
-                        {
-                            dh.ExecuteSql("insert into MAKESNRELATION(beforesn,sn,firstsn,makecode,msr_indate,msr_inman) values('"+ ms_firstsn + "','" + newsncode + "','" + ms_firstsn + "','" + ma_code + "',sysdate,'"+User.UserName+"')", "insert");
-                        }
-                        dh.ExecuteSql("update makeserial set ms_sncode = '"+newsncode+"' where ms_sncode = '"+sn_code.Text+"' and ms_makecode = '"+ma_code+"'", "update");
-                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "上料采集特殊SN替换", "SN"+ sn_code.Text+"更新为"+ newsncode, newsncode, "");
-                        OperateResult.AppendText("SN" + sn_code.Text + "更新为" + newsncode + "\n");
-                        sn_code.Text = newsncode;
-                    }
                     //提示正确返回时传递的信息
                     if (ErrorMessage.Contains("AFTERSUCCESS"))
                         OperateResult.AppendText(">>" + ErrorMessage + "\n");

+ 7 - 7
UAS_MES_ZT/FunctionCode/Make/Make_RepairOk.cs

@@ -617,11 +617,11 @@ namespace UAS_MES_NEW.Make
                         string ms_ifrework = dt.Rows[0]["ms_ifrework"].ToString();
                         string ms_paststep = dt.Rows[0]["ms_paststep"].ToString();
                         //如果回流的执行过的工序为空
-                        if (!ms_paststep.Contains(cd_stepcode.Text) && ms_paststep != "")
-                        {
-                            OperatResult.AppendText(">>不允许回流到未执行的工序\n", Color.Red);
-                            return;
-                        }
+                        //if (!ms_paststep.Contains(cd_stepcode.Text) && ms_paststep != "")
+                        //{
+                        //    OperatResult.AppendText(">>不允许回流到未执行的工序\n", Color.Red);
+                        //    return;
+                        //}
                         if (ms_ifrework == "0")
                             SQLS.Add("update makeserial set 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_status=1 where ms_id='" + msid + "'");
                         else
@@ -929,7 +929,7 @@ namespace UAS_MES_NEW.Make
         private void cr_code_UserControlTextChanged(object sender, EventArgs e)
         {
             //cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and  ( cd_ifburnout <>0) order by cd_stepno";
-            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and cd_ifoqc <> -1 order by cd_stepno";
+            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and ST_IFOFFLINE = -1 order by cd_stepno";
         }
 
         private void Clean_Click(object sender, EventArgs e)
@@ -977,7 +977,7 @@ namespace UAS_MES_NEW.Make
             bd_soncode.Condition = "bd_mothercode='" + ms_prodcode.Text + "' and NVL(bd_usestatus,' ')<>'DISABLE'";
             //设置工序的条件
             //cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and  ( cd_ifburnout <>0) order by cd_stepno";
-            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "'  and cr_prodcode='" + ms_prodcode.Text + "' and cd_ifoqc <> -1  order by cd_stepno";
+            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "'  and cr_prodcode='" + ms_prodcode.Text + "' and ST_IFOFFLINE = -1 order by cd_stepno";
         }
 
         public void RefreshData()

+ 1 - 1
UAS_MES_ZT/FunctionCode/Make/Make_SeqTransform.cs

@@ -314,7 +314,7 @@ namespace UAS_MES_NEW.Make
                                     dh.ExecuteSQLTran(updateSql, insertSql);
                                 }
                                 onlyPass = false;
-                                OperateResult.AppendText("<<序列号" + bsncode + "成功转换为" + sncode.Text + "\n", Color.Green);
+                                OperateResult.AppendText("<<序列号" + bsncode + "成功转换为" + sncode.Text + "\n", Color.LawnGreen);
                                 //记录日志
                                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "序列转换", bsncode + "转换为" + sncode.Text, sncode.Text, "");
                                 //if (CollectRemark.Checked && Remark.Text != "")

+ 23 - 1
UAS_MES_ZT/FunctionCode/Make/Make_TestCollection.cs

@@ -357,7 +357,29 @@ namespace UAS_MES_NEW.Make
                     lvi.SubItems.Add(dt.Rows[i][j].ToString());
                 ChoosedRejectList.Items.Add(lvi);
             }
-            ChoosedRejectList.EndUpdate();
+            if (!dh.CheckExist("makebad", "mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "'"))
+            {
+                sql.Clear();
+                sql.Append("select as_bgname||':'||as_bgcode bg_code,as_badcode bc_code,as_badname bc_name,'' mb_badremark from RETURNSNBD left join AFSALES on rsb_oldsn = as_sn where rsb_newsn  = '" + ms_sncode.Text + "' ");
+
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    ListViewItem lvi = new ListViewItem();
+                    //第一列是勾选列,设置列头文本为空
+                    lvi.Text = "";
+                    ChoosedList.Add(dt.Rows[i]["bc_code"].ToString());
+                    for (int j = 0; j < dt.Columns.Count; j++)
+                        lvi.SubItems.Add(dt.Rows[i][j].ToString());
+                    ChoosedRejectList.Items.Add(lvi);
+                }
+                ChoosedRejectList.EndUpdate();
+            }
+            else
+            {
+                ChoosedRejectList.EndUpdate();
+            }
             
         }
 

+ 4 - 4
UAS_MES_ZT/FunctionCode/OQC/OQC_BatchResultJudge.cs

@@ -129,7 +129,7 @@ namespace UAS_MES_NEW.OQC
                     if (LogicHandler.OQCBatchJudge(ob_checkno.Text, User.UserSourceCode, "OK", "", User.UserCode, Remark.Text, out ReworkCode, out ErrorMessage))
                     {
                         LogicHandler.DoCommandLog(Tag.ToString(),User.UserCode,"",User.UserLineCode,User.UserSourceCode,"通过批", "抽检批: "+ ob_checkno.Text+"通过","",ob_checkno.Text);
-                        OperateResult.AppendText(">>通过批成功\n", Color.Green);
+                        OperateResult.AppendText(">>通过批成功\n", Color.Aquamarine);
                         GetBatch.PerformClick();
                     }
                     else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
@@ -146,7 +146,7 @@ namespace UAS_MES_NEW.OQC
             {
                 if (LogicHandler.OQCBatchJudge(ob_checkno.Text, User.UserSourceCode, "NG", ReworkRequire.Checked ? "Y" : "N", User.UserCode, Remark.Text, out ReworkCode, out ErrorMessage))
                 {
-                    OperateResult.AppendText(">>判退批成功\n", Color.Green);
+                    OperateResult.AppendText(">>判退批成功\n", Color.Brown);
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "判退批", "抽检批: " + ob_checkno.Text + "判退", "", ob_checkno.Text);
                     if (ReworkRequire.Checked)
                     {
@@ -167,7 +167,7 @@ namespace UAS_MES_NEW.OQC
                 if (LogicHandler.OQCBatchJudge(ob_checkno.Text, User.UserSourceCode, "FOK", "", User.UserCode, Remark.Text, out ReworkCode, out ErrorMessage))
                 {
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "强制通过批", "抽检批: " + ob_checkno.Text + "强制通过", "", ob_checkno.Text);
-                    OperateResult.AppendText(">>强制通过批" + ob_checkno.Text + "成功\n", Color.Green);
+                    OperateResult.AppendText(">>强制通过批" + ob_checkno.Text + "成功\n", Color.Chartreuse);
                     GetBatch.PerformClick();
                 }
                 else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
@@ -181,7 +181,7 @@ namespace UAS_MES_NEW.OQC
             {
                 if (LogicHandler.OQCBatchJudge(ob_checkno.Text, User.UserSourceCode, "FNG", ReworkRequire.Checked ? "Y" : "N", User.UserCode, Remark.Text, out ReworkCode, out ErrorMessage))
                 {
-                    OperateResult.AppendText(">>强制退批" + ob_checkno.Text + "成功\n", Color.Green);
+                    OperateResult.AppendText(">>强制退批" + ob_checkno.Text + "成功\n", Color.Crimson);
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "强制退批", "抽检批: " + ob_checkno.Text + "强制退批", "", ob_checkno.Text);
                     if (ReworkRequire.Checked)
                     {

+ 1 - 1
UAS_MES_ZT/FunctionCode/OQC/OQC_SamplingDataCollection.cs

@@ -383,7 +383,7 @@ namespace UAS_MES_NEW.OQC
                     {
                         GetBatch.PerformClick();
                         BatchPass.Enabled = false;
-                        OperateResult.AppendText(">>批次号" + ob_checkno.Text + "通过批成功\n", Color.Green);
+                        OperateResult.AppendText(">>批次号" + ob_checkno.Text + "通过批成功\n", Color.Aquamarine);
                         ob_checkno.Text = "";
                         //记录操作日志
                     }

+ 16 - 2
UAS_MES_ZT/FunctionCode/Packing/Packing_CartonSplit.cs

@@ -117,7 +117,7 @@ namespace UAS_MES_NEW.Packing
                     //更新序列号
                     dh.ExecuteSql("update makeserial set ms_outboxcode='' , ms_nextstepcode=ms_stepcode where ms_id='" + ms_id + "'", "update");
                     //更新箱内当前数量
-                    dh.ExecuteSql("update package set pa_currentqty=pa_currentqty-1,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
+                    dh.ExecuteSql("update package set pa_currentqty=pa_currentqty-1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                     //记录拆箱操作日志
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, packtype.Text, User.UserLineCode, User.UserSourceCode, "卡通箱拆箱", "卡通箱拆箱成功,序列号:" + sncode.Text + ",箱号:" + pa_outboxcode.Text, sncode.Text, "");
                     //提示拆箱成功
@@ -139,7 +139,7 @@ namespace UAS_MES_NEW.Packing
             //校验箱号
             sql.Clear();
             sql.Append("select pa_prodcode,pr_detail,pr_spec,pa_standardqty,nvl(pa_currentqty,0) pa_currentqty,pa_salecode,pa_makecode,");
-            sql.Append("pa_packtype,nvl(pa_downstatus,0) pa_downstatus,pa_checkno from package left join product on ");
+            sql.Append("pa_packtype,nvl(pa_downstatus,0) pa_downstatus,pa_checkno,pa_iostatus from package left join product on ");
             sql.Append("pr_code=pa_prodcode where pa_outboxcode='" + pa_outboxcode.Text + "'  and PA_TYPE=1");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             //查询无值,提示用户 “箱号不存在”,清空输入框中的值
@@ -154,6 +154,20 @@ namespace UAS_MES_NEW.Packing
                 OperateResult.AppendText("<<箱号" + pa_outboxcode.Text + "不存在\n", Color.Red, pa_outboxcode);
                 return false;
             }
+
+            //判断是否下地
+            if (dt.Rows[0]["pa_iostatus"].ToString() == "1")
+            {
+                if (flag)
+                {
+                    MessageBox.Show("箱号" + pa_outboxcode.Text + "已入库不允许操作");
+                    pa_outboxcode.Focus();
+                    return false;
+                }
+                OperateResult.AppendText("<<箱号" + pa_outboxcode.Text + "已入库不允许操作\n", Color.Red, pa_outboxcode);
+                return false;
+            }
+
             //判断是否下地
             if (dt.Rows[0]["pa_downstatus"].ToString() != "0")
             {

+ 127 - 97
UAS_MES_ZT/FunctionCode/Packing/Packing_CartonTransfer.Designer.cs

@@ -73,17 +73,19 @@
             // 
             this.sn_code_label.AutoSize = true;
             this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sn_code_label.Location = new System.Drawing.Point(14, 464);
+            this.sn_code_label.Location = new System.Drawing.Point(21, 696);
+            this.sn_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.sn_code_label.Name = "sn_code_label";
-            this.sn_code_label.Size = new System.Drawing.Size(58, 21);
+            this.sn_code_label.Size = new System.Drawing.Size(86, 31);
             this.sn_code_label.TabIndex = 176;
             this.sn_code_label.Text = "序列号";
             // 
             // 清除
             // 
-            this.清除.Location = new System.Drawing.Point(849, 462);
+            this.清除.Location = new System.Drawing.Point(1274, 693);
+            this.清除.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.清除.Name = "清除";
-            this.清除.Size = new System.Drawing.Size(48, 23);
+            this.清除.Size = new System.Drawing.Size(72, 34);
             this.清除.TabIndex = 178;
             this.清除.Text = "清除";
             this.清除.UseVisualStyleBackColor = true;
@@ -94,10 +96,11 @@
             this.sn_code.AllPower = null;
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(81, 466);
+            this.sn_code.Location = new System.Drawing.Point(122, 699);
+            this.sn_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.sn_code.Name = "sn_code";
             this.sn_code.Power = null;
-            this.sn_code.Size = new System.Drawing.Size(196, 21);
+            this.sn_code.Size = new System.Drawing.Size(292, 28);
             this.sn_code.Str = null;
             this.sn_code.Str1 = null;
             this.sn_code.Str2 = null;
@@ -107,9 +110,10 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(9, 185);
+            this.OperateResult.Location = new System.Drawing.Point(14, 278);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(889, 272);
+            this.OperateResult.Size = new System.Drawing.Size(1332, 406);
             this.OperateResult.TabIndex = 175;
             this.OperateResult.Text = "";
             // 
@@ -126,11 +130,9 @@
             this.groupBoxWithBorder2.Controls.Add(this.newpack);
             this.groupBoxWithBorder2.Controls.Add(this.movepack);
             this.groupBoxWithBorder2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder2.Location = new System.Drawing.Point(455, 10);
-            this.groupBoxWithBorder2.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBoxWithBorder2.Location = new System.Drawing.Point(682, 15);
             this.groupBoxWithBorder2.Name = "groupBoxWithBorder2";
-            this.groupBoxWithBorder2.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBoxWithBorder2.Size = new System.Drawing.Size(446, 157);
+            this.groupBoxWithBorder2.Size = new System.Drawing.Size(669, 236);
             this.groupBoxWithBorder2.TabIndex = 174;
             this.groupBoxWithBorder2.TabStop = false;
             this.groupBoxWithBorder2.Text = "转移箱";
@@ -143,12 +145,13 @@
             this.ALLMOVE.DownImage = ((System.Drawing.Image)(resources.GetObject("ALLMOVE.DownImage")));
             this.ALLMOVE.Image = null;
             this.ALLMOVE.IsShowBorder = true;
-            this.ALLMOVE.Location = new System.Drawing.Point(282, 115);
+            this.ALLMOVE.Location = new System.Drawing.Point(423, 172);
+            this.ALLMOVE.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ALLMOVE.MoveImage = ((System.Drawing.Image)(resources.GetObject("ALLMOVE.MoveImage")));
             this.ALLMOVE.Name = "ALLMOVE";
             this.ALLMOVE.NormalImage = ((System.Drawing.Image)(resources.GetObject("ALLMOVE.NormalImage")));
             this.ALLMOVE.Power = null;
-            this.ALLMOVE.Size = new System.Drawing.Size(70, 25);
+            this.ALLMOVE.Size = new System.Drawing.Size(105, 38);
             this.ALLMOVE.TabIndex = 179;
             this.ALLMOVE.Text = "全部移箱";
             this.ALLMOVE.UseVisualStyleBackColor = false;
@@ -160,11 +163,12 @@
             this.pa_standardqty.BackColor = System.Drawing.Color.White;
             this.pa_standardqty.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.pa_standardqty.ID = null;
-            this.pa_standardqty.Location = new System.Drawing.Point(111, 118);
+            this.pa_standardqty.Location = new System.Drawing.Point(166, 177);
+            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pa_standardqty.Name = "pa_standardqty";
             this.pa_standardqty.Negative = false;
             this.pa_standardqty.Power = null;
-            this.pa_standardqty.Size = new System.Drawing.Size(150, 23);
+            this.pa_standardqty.Size = new System.Drawing.Size(223, 31);
             this.pa_standardqty.Str = null;
             this.pa_standardqty.Str1 = null;
             this.pa_standardqty.Str2 = null;
@@ -174,36 +178,40 @@
             // 
             this.pa_currentqty.AutoSize = true;
             this.pa_currentqty.CutLength = null;
-            this.pa_currentqty.Location = new System.Drawing.Point(363, 61);
-            this.pa_currentqty.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_currentqty.Location = new System.Drawing.Point(543, 90);
+            this.pa_currentqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_currentqty.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_currentqty.Name = "pa_currentqty";
-            this.pa_currentqty.Size = new System.Drawing.Size(0, 21);
+            this.pa_currentqty.Size = new System.Drawing.Size(0, 31);
             this.pa_currentqty.TabIndex = 173;
             // 
             // label4
             // 
             this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(283, 61);
+            this.label4.Location = new System.Drawing.Point(423, 90);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(74, 21);
+            this.label4.Size = new System.Drawing.Size(110, 31);
             this.label4.TabIndex = 6;
             this.label4.Text = "箱内数量";
             // 
             // label3
             // 
             this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(22, 117);
+            this.label3.Location = new System.Drawing.Point(32, 174);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(74, 21);
+            this.label3.Size = new System.Drawing.Size(110, 31);
             this.label3.TabIndex = 5;
             this.label3.Text = "标准容量";
             // 
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(22, 62);
+            this.label2.Location = new System.Drawing.Point(32, 92);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(74, 21);
+            this.label2.Size = new System.Drawing.Size(110, 31);
             this.label2.TabIndex = 4;
             this.label2.Text = "目标箱号";
             // 
@@ -213,10 +221,11 @@
             this.pa_outboxcode.BackColor = System.Drawing.Color.White;
             this.pa_outboxcode.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.pa_outboxcode.ID = null;
-            this.pa_outboxcode.Location = new System.Drawing.Point(111, 63);
+            this.pa_outboxcode.Location = new System.Drawing.Point(166, 94);
+            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = null;
-            this.pa_outboxcode.Size = new System.Drawing.Size(150, 23);
+            this.pa_outboxcode.Size = new System.Drawing.Size(223, 31);
             this.pa_outboxcode.Str = null;
             this.pa_outboxcode.Str1 = null;
             this.pa_outboxcode.Str2 = null;
@@ -226,21 +235,24 @@
             // newpack
             // 
             this.newpack.AutoSize = true;
-            this.newpack.Location = new System.Drawing.Point(126, 23);
+            this.newpack.Location = new System.Drawing.Point(188, 33);
+            this.newpack.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.newpack.Name = "newpack";
-            this.newpack.Size = new System.Drawing.Size(60, 25);
+            this.newpack.Size = new System.Drawing.Size(87, 35);
             this.newpack.TabIndex = 1;
             this.newpack.TabStop = true;
             this.newpack.Text = "新箱";
             this.newpack.UseVisualStyleBackColor = true;
+            this.newpack.Visible = false;
             this.newpack.Click += new System.EventHandler(this.movepack_Click);
             // 
             // movepack
             // 
             this.movepack.AutoSize = true;
-            this.movepack.Location = new System.Drawing.Point(26, 23);
+            this.movepack.Location = new System.Drawing.Point(38, 33);
+            this.movepack.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.movepack.Name = "movepack";
-            this.movepack.Size = new System.Drawing.Size(60, 25);
+            this.movepack.Size = new System.Drawing.Size(87, 35);
             this.movepack.TabIndex = 0;
             this.movepack.TabStop = true;
             this.movepack.Text = "移箱";
@@ -271,11 +283,9 @@
             this.groupBoxWithBorder1.Controls.Add(this.pr_outboxinnerqty_label);
             this.groupBoxWithBorder1.Controls.Add(this.pa_code_label);
             this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder1.Location = new System.Drawing.Point(9, 10);
-            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(14, 15);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBoxWithBorder1.Size = new System.Drawing.Size(442, 157);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(663, 236);
             this.groupBoxWithBorder1.TabIndex = 173;
             this.groupBoxWithBorder1.TabStop = false;
             this.groupBoxWithBorder1.Text = "原箱信息";
@@ -285,10 +295,11 @@
             // 
             this.pa_weight.AutoSize = true;
             this.pa_weight.CutLength = null;
-            this.pa_weight.Location = new System.Drawing.Point(237, 84);
-            this.pa_weight.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_weight.Location = new System.Drawing.Point(354, 124);
+            this.pa_weight.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_weight.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_weight.Name = "pa_weight";
-            this.pa_weight.Size = new System.Drawing.Size(0, 21);
+            this.pa_weight.Size = new System.Drawing.Size(0, 31);
             this.pa_weight.TabIndex = 184;
             this.pa_weight.Visible = false;
             // 
@@ -296,10 +307,11 @@
             // 
             this.pa_sccode.AutoSize = true;
             this.pa_sccode.CutLength = null;
-            this.pa_sccode.Location = new System.Drawing.Point(229, 76);
-            this.pa_sccode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_sccode.Location = new System.Drawing.Point(342, 112);
+            this.pa_sccode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_sccode.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_sccode.Name = "pa_sccode";
-            this.pa_sccode.Size = new System.Drawing.Size(0, 21);
+            this.pa_sccode.Size = new System.Drawing.Size(0, 31);
             this.pa_sccode.TabIndex = 183;
             this.pa_sccode.Visible = false;
             // 
@@ -307,10 +319,11 @@
             // 
             this.pa_nextstep.AutoSize = true;
             this.pa_nextstep.CutLength = null;
-            this.pa_nextstep.Location = new System.Drawing.Point(221, 68);
-            this.pa_nextstep.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_nextstep.Location = new System.Drawing.Point(330, 100);
+            this.pa_nextstep.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_nextstep.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_nextstep.Name = "pa_nextstep";
-            this.pa_nextstep.Size = new System.Drawing.Size(0, 21);
+            this.pa_nextstep.Size = new System.Drawing.Size(0, 31);
             this.pa_nextstep.TabIndex = 182;
             this.pa_nextstep.Visible = false;
             // 
@@ -320,10 +333,11 @@
             this.ms_outboxcode.BackColor = System.Drawing.Color.White;
             this.ms_outboxcode.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.ms_outboxcode.ID = null;
-            this.ms_outboxcode.Location = new System.Drawing.Point(72, 38);
+            this.ms_outboxcode.Location = new System.Drawing.Point(108, 57);
+            this.ms_outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ms_outboxcode.Name = "ms_outboxcode";
             this.ms_outboxcode.Power = null;
-            this.ms_outboxcode.Size = new System.Drawing.Size(110, 23);
+            this.ms_outboxcode.Size = new System.Drawing.Size(163, 31);
             this.ms_outboxcode.Str = null;
             this.ms_outboxcode.Str1 = null;
             this.ms_outboxcode.Str2 = null;
@@ -334,10 +348,11 @@
             // 
             this.pa_packtype.AutoSize = true;
             this.pa_packtype.CutLength = null;
-            this.pa_packtype.Location = new System.Drawing.Point(112, 7);
-            this.pa_packtype.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_packtype.Location = new System.Drawing.Point(166, 9);
+            this.pa_packtype.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_packtype.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_packtype.Name = "pa_packtype";
-            this.pa_packtype.Size = new System.Drawing.Size(0, 21);
+            this.pa_packtype.Size = new System.Drawing.Size(0, 31);
             this.pa_packtype.TabIndex = 181;
             this.pa_packtype.Visible = false;
             // 
@@ -345,10 +360,11 @@
             // 
             this.pa_type.AutoSize = true;
             this.pa_type.CutLength = null;
-            this.pa_type.Location = new System.Drawing.Point(400, 14);
-            this.pa_type.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_type.Location = new System.Drawing.Point(598, 20);
+            this.pa_type.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_type.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_type.Name = "pa_type";
-            this.pa_type.Size = new System.Drawing.Size(0, 21);
+            this.pa_type.Size = new System.Drawing.Size(0, 31);
             this.pa_type.TabIndex = 180;
             this.pa_type.Visible = false;
             // 
@@ -356,10 +372,11 @@
             // 
             this.pa_custcode.AutoSize = true;
             this.pa_custcode.CutLength = null;
-            this.pa_custcode.Location = new System.Drawing.Point(369, 15);
-            this.pa_custcode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_custcode.Location = new System.Drawing.Point(552, 21);
+            this.pa_custcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_custcode.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_custcode.Name = "pa_custcode";
-            this.pa_custcode.Size = new System.Drawing.Size(0, 21);
+            this.pa_custcode.Size = new System.Drawing.Size(0, 31);
             this.pa_custcode.TabIndex = 179;
             this.pa_custcode.Visible = false;
             // 
@@ -367,10 +384,11 @@
             // 
             this.pa_salecode.AutoSize = true;
             this.pa_salecode.CutLength = null;
-            this.pa_salecode.Location = new System.Drawing.Point(281, 7);
-            this.pa_salecode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_salecode.Location = new System.Drawing.Point(420, 9);
+            this.pa_salecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_salecode.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_salecode.Name = "pa_salecode";
-            this.pa_salecode.Size = new System.Drawing.Size(0, 21);
+            this.pa_salecode.Size = new System.Drawing.Size(0, 31);
             this.pa_salecode.TabIndex = 178;
             this.pa_salecode.Visible = false;
             // 
@@ -378,10 +396,11 @@
             // 
             this.pa_level.AutoSize = true;
             this.pa_level.CutLength = null;
-            this.pa_level.Location = new System.Drawing.Point(104, 7);
-            this.pa_level.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_level.Location = new System.Drawing.Point(154, 9);
+            this.pa_level.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_level.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_level.Name = "pa_level";
-            this.pa_level.Size = new System.Drawing.Size(0, 21);
+            this.pa_level.Size = new System.Drawing.Size(0, 31);
             this.pa_level.TabIndex = 177;
             this.pa_level.Visible = false;
             // 
@@ -389,59 +408,65 @@
             // 
             this.lastsccode.AutoSize = true;
             this.lastsccode.CutLength = null;
-            this.lastsccode.Location = new System.Drawing.Point(334, 111);
-            this.lastsccode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.lastsccode.Location = new System.Drawing.Point(500, 165);
+            this.lastsccode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.lastsccode.MaximumSize = new System.Drawing.Size(300, 0);
             this.lastsccode.Name = "lastsccode";
-            this.lastsccode.Size = new System.Drawing.Size(0, 21);
+            this.lastsccode.Size = new System.Drawing.Size(0, 31);
             this.lastsccode.TabIndex = 176;
             // 
             // ms_msmakecode
             // 
             this.ms_msmakecode.AutoSize = true;
             this.ms_msmakecode.CutLength = null;
-            this.ms_msmakecode.Location = new System.Drawing.Point(334, 75);
-            this.ms_msmakecode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.ms_msmakecode.Location = new System.Drawing.Point(500, 111);
+            this.ms_msmakecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_msmakecode.MaximumSize = new System.Drawing.Size(300, 0);
             this.ms_msmakecode.Name = "ms_msmakecode";
-            this.ms_msmakecode.Size = new System.Drawing.Size(0, 21);
+            this.ms_msmakecode.Size = new System.Drawing.Size(0, 31);
             this.ms_msmakecode.TabIndex = 175;
             // 
             // laststepcode
             // 
             this.laststepcode.AutoSize = true;
             this.laststepcode.CutLength = null;
-            this.laststepcode.Location = new System.Drawing.Point(121, 111);
-            this.laststepcode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.laststepcode.Location = new System.Drawing.Point(180, 165);
+            this.laststepcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.laststepcode.MaximumSize = new System.Drawing.Size(300, 0);
             this.laststepcode.Name = "laststepcode";
-            this.laststepcode.Size = new System.Drawing.Size(0, 21);
+            this.laststepcode.Size = new System.Drawing.Size(0, 31);
             this.laststepcode.TabIndex = 174;
             // 
             // ms_prodcode
             // 
             this.ms_prodcode.AutoSize = true;
             this.ms_prodcode.CutLength = null;
-            this.ms_prodcode.Location = new System.Drawing.Point(121, 75);
-            this.ms_prodcode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.ms_prodcode.Location = new System.Drawing.Point(180, 111);
+            this.ms_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_prodcode.MaximumSize = new System.Drawing.Size(300, 0);
             this.ms_prodcode.Name = "ms_prodcode";
-            this.ms_prodcode.Size = new System.Drawing.Size(0, 21);
+            this.ms_prodcode.Size = new System.Drawing.Size(0, 31);
             this.ms_prodcode.TabIndex = 173;
             // 
             // pa_qty
             // 
             this.pa_qty.AutoSize = true;
             this.pa_qty.CutLength = null;
-            this.pa_qty.Location = new System.Drawing.Point(334, 36);
-            this.pa_qty.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_qty.Location = new System.Drawing.Point(500, 52);
+            this.pa_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_qty.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_qty.Name = "pa_qty";
-            this.pa_qty.Size = new System.Drawing.Size(0, 21);
+            this.pa_qty.Size = new System.Drawing.Size(0, 31);
             this.pa_qty.TabIndex = 172;
             // 
             // 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(223, 35);
+            this.label1.Location = new System.Drawing.Point(333, 51);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(74, 21);
+            this.label1.Size = new System.Drawing.Size(110, 31);
             this.label1.TabIndex = 171;
             this.label1.Text = "箱内数量";
             // 
@@ -449,9 +474,10 @@
             // 
             this.pa_currentqty_label.AutoSize = true;
             this.pa_currentqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty_label.Location = new System.Drawing.Point(223, 111);
+            this.pa_currentqty_label.Location = new System.Drawing.Point(333, 165);
+            this.pa_currentqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_currentqty_label.Name = "pa_currentqty_label";
-            this.pa_currentqty_label.Size = new System.Drawing.Size(106, 21);
+            this.pa_currentqty_label.Size = new System.Drawing.Size(158, 31);
             this.pa_currentqty_label.TabIndex = 95;
             this.pa_currentqty_label.Text = "最后所在资源";
             // 
@@ -459,9 +485,10 @@
             // 
             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(223, 75);
+            this.pr_detail_label.Location = new System.Drawing.Point(333, 111);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(81, 21);
+            this.pr_detail_label.Size = new System.Drawing.Size(120, 31);
             this.pr_detail_label.TabIndex = 80;
             this.pr_detail_label.Text = "工单/合同";
             // 
@@ -469,9 +496,10 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(10, 75);
+            this.pr_code_label.Location = new System.Drawing.Point(14, 111);
+            this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(74, 21);
+            this.pr_code_label.Size = new System.Drawing.Size(110, 31);
             this.pr_code_label.TabIndex = 81;
             this.pr_code_label.Text = "产品编号";
             // 
@@ -479,9 +507,10 @@
             // 
             this.pr_outboxinnerqty_label.AutoSize = true;
             this.pr_outboxinnerqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(10, 111);
+            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(14, 165);
+            this.pr_outboxinnerqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_outboxinnerqty_label.Name = "pr_outboxinnerqty_label";
-            this.pr_outboxinnerqty_label.Size = new System.Drawing.Size(106, 21);
+            this.pr_outboxinnerqty_label.Size = new System.Drawing.Size(158, 31);
             this.pr_outboxinnerqty_label.TabIndex = 97;
             this.pr_outboxinnerqty_label.Text = "最后所在工序";
             // 
@@ -489,9 +518,10 @@
             // 
             this.pa_code_label.AutoSize = true;
             this.pa_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_code_label.Location = new System.Drawing.Point(10, 36);
+            this.pa_code_label.Location = new System.Drawing.Point(14, 52);
+            this.pa_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_code_label.Name = "pa_code_label";
-            this.pa_code_label.Size = new System.Drawing.Size(58, 21);
+            this.pa_code_label.Size = new System.Drawing.Size(86, 31);
             this.pa_code_label.TabIndex = 113;
             this.pa_code_label.Text = "原箱号";
             // 
@@ -499,18 +529,19 @@
             // 
             this.pa_status.AutoSize = true;
             this.pa_status.CutLength = null;
-            this.pa_status.Location = new System.Drawing.Point(551, 472);
-            this.pa_status.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_status.Location = new System.Drawing.Point(826, 708);
+            this.pa_status.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_status.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_status.Name = "pa_status";
-            this.pa_status.Size = new System.Drawing.Size(0, 12);
+            this.pa_status.Size = new System.Drawing.Size(0, 18);
             this.pa_status.TabIndex = 185;
             this.pa_status.Visible = false;
             // 
             // Packing_CartonTransfer
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(910, 502);
+            this.ClientSize = new System.Drawing.Size(1365, 753);
             this.Controls.Add(this.pa_status);
             this.Controls.Add(this.清除);
             this.Controls.Add(this.sn_code);
@@ -519,17 +550,16 @@
             this.Controls.Add(this.groupBoxWithBorder2);
             this.Controls.Add(this.groupBoxWithBorder1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(2);
             this.Name = "Packing_CartonTransfer";
             this.Tag = "Packing!CartonTransfer";
             this.Text = "卡通箱转移";
             this.Load += new System.EventHandler(this.Packing_CartonTransfer_Load);
             this.SizeChanged += new System.EventHandler(this.Packing_CartonTransfer_SizeChanged);
-            this.groupBoxWithBorder2.ResumeLayout(true);
+            this.groupBoxWithBorder2.ResumeLayout(false);
             this.groupBoxWithBorder2.PerformLayout();
-            this.groupBoxWithBorder1.ResumeLayout(true);
+            this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }

+ 21 - 5
UAS_MES_ZT/FunctionCode/Packing/Packing_CartonTransfer.cs

@@ -35,6 +35,7 @@ namespace UAS_MES_NEW.Packing
         string new_pa_checkno;
         string new_ob_status;
         string new_pa_mothercode;
+        string new_pa_iostatus;
 
         public Packing_CartonTransfer()
         {
@@ -118,7 +119,7 @@ namespace UAS_MES_NEW.Packing
                     if (ms_outboxcode != "")
                     {
                         sql.Clear();
-                        sql.Append("select pa_id,pa_checkno,PA_MAKECODE,PA_CURRENTQTY pa_qty,PA_PACKTYPE,nvl(PA_DOWNSTATUS,0) PA_DOWNSTATUS,pa_prodcode  pa_macode,pa_salecode,pa_level,pa_custcode,pa_type,pa_packtype,pa_mothercode,pa_weight,pa_nextstep,pa_status,pa_sccode  from package where pa_outboxcode='" + ms_outboxcode + "'");
+                        sql.Append("select pa_id,pa_checkno,PA_MAKECODE,PA_CURRENTQTY pa_qty,PA_PACKTYPE,nvl(PA_DOWNSTATUS,0) PA_DOWNSTATUS,pa_prodcode  pa_macode,pa_salecode,pa_level,pa_custcode,pa_type,pa_packtype,pa_mothercode,pa_weight,pa_nextstep,pa_status,pa_sccode,pa_iostatus from package where pa_outboxcode='" + ms_outboxcode + "'");
                         dtbar = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                         if (dtbar.Rows.Count > 0)
                         {
@@ -127,7 +128,13 @@ namespace UAS_MES_NEW.Packing
                             string pa_checkno = dtbar.Rows[0]["pa_checkno"].ToString();
                             string PA_DOWNSTATUS = dtbar.Rows[0]["PA_DOWNSTATUS"].ToString();
                             string old_pa_id = dtbar.Rows[0]["pa_id"].ToString();
+                            string pa_iostatus = dtbar.Rows[0]["pa_iostatus"].ToString();
                             string ob_status = dh.getFieldDataByCondition("oqcbatch", "ob_status", "ob_checkno = '" + pa_checkno + "'").ToString();
+                            if (pa_iostatus == "1")
+                            {
+                                OperateResult.AppendText(">>原箱" + ms_outboxcode + "已采集入库,不允许转移\n", Color.Red, sn_code);
+                                return;
+                            }
                             if (pa_mothercode != "")
                             {
                                 OperateResult.AppendText(">>原箱" + ms_outboxcode + "已装入大箱或栈板" + pa_mothercode + ",不允许转移\n", Color.Red, sn_code);
@@ -178,7 +185,7 @@ namespace UAS_MES_NEW.Packing
                                                     sql.Append("values (packagedetail_seq.nextval,'" + pa_id + "','" + pa_outboxcode.Text + "','" + sn_code.Text + "','1','" + msprodcode + "','" + ms_makecode + "',sysdate,to_char(sysdate,'yyyymmdd'))");
                                                     dh.ExecuteSql(sql.GetString(), "insert");
                                                     //更新原箱数量
-                                                    dh.UpdateByCondition("package", "pa_currentqty=pa_currentqty-1,pa_status=0", "pa_outboxcode = '" + ms_outboxcode + "'");
+                                                    dh.UpdateByCondition("package", "pa_currentqty=pa_currentqty-1", "pa_outboxcode = '" + ms_outboxcode + "'");
                                                     //更新目标箱数量
                                                     dh.UpdateByCondition("package", "pa_currentqty=1, pa_totalqty=1,pa_packageqty=1", "pa_outboxcode = '" + pa_outboxcode.Text + "'");
                                                     dh.UpdateByCondition("makeserial", "ms_outboxcode = '" + pa_outboxcode.Text + "'", "ms_id = '" + ms_id + "'");
@@ -278,7 +285,7 @@ namespace UAS_MES_NEW.Packing
                                         sql.Append("values (packagedetail_seq.nextval,'" + dh.getFieldDataByCondition("package", "pa_id", "PA_OUTBOXCODE = '" + pa_outboxcode.Text + "'").ToString() + "','" + pa_outboxcode.Text + "','" + sn_code.Text + "','1','" + msprodcode + "','" + ms_makecode + "',sysdate,to_char(sysdate,'yyyymmdd'))");
                                         dh.ExecuteSql(sql.GetString(), "insert");
                                         //更新原箱数量
-                                        dh.UpdateByCondition("package", "pa_currentqty=pa_currentqty-1,pa_status=0", "pa_outboxcode = '" + ms_outboxcode + "'");
+                                        dh.UpdateByCondition("package", "pa_currentqty=pa_currentqty-1", "pa_outboxcode = '" + ms_outboxcode + "'");
                                         //更新目标箱数量
                                         dh.UpdateByCondition("package", "pa_currentqty=nvl(pa_currentqty,0)+ 1,pa_totalqty=nvl(pa_totalqty,0)+1,pa_packageqty=nvl(pa_packageqty ,0)+1", "pa_outboxcode = '" + pa_outboxcode.Text + "'");
                                         dh.UpdateByCondition("makeserial", "ms_outboxcode = '" + pa_outboxcode.Text + "'", "ms_id = '" + ms_id + "'");
@@ -307,7 +314,7 @@ namespace UAS_MES_NEW.Packing
         private Boolean CheckBoxCode()
         {
             sql.Clear();
-            sql.Append("select pa_id,pa_outboxcode,pa_checkno,pa_standardqty,nvl(pa_currentqty,0) pa_currentqty,pa_packtype,pa_prodcode,nvl(pa_downstatus,0) pa_downstatus,pa_salecode,pa_mothercode from package where pa_outboxcode='" + pa_outboxcode.Text + "'");
+            sql.Append("select pa_id,pa_outboxcode,pa_checkno,pa_standardqty,nvl(pa_currentqty,0) pa_currentqty,pa_packtype,pa_prodcode,nvl(pa_downstatus,0) pa_downstatus,pa_salecode,pa_mothercode,pa_iostatus from package where pa_outboxcode='" + pa_outboxcode.Text + "'");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             if (dt.Rows.Count > 0)
             {
@@ -319,7 +326,16 @@ namespace UAS_MES_NEW.Packing
                 new_pa_salecode = dt.Rows[0]["pa_salecode"].ToString();
                 new_pa_checkno = dt.Rows[0]["pa_checkno"].ToString();
                 new_pa_mothercode = dt.Rows[0]["pa_mothercode"].ToString();
+                new_pa_iostatus = dt.Rows[0]["pa_iostatus"].ToString();
                 new_ob_status = dh.getFieldDataByCondition("oqcbatch", "ob_status", "ob_checkno = '" + new_pa_checkno + "'").ToString();
+                if (new_pa_iostatus == "1")
+                {
+                    OperateResult.AppendText(">>该目标箱号" + pa_outboxcode.Text + "已入库,不允许操作\n", Color.Red, pa_outboxcode);
+                    BaseUtil.CleanControls(groupBoxWithBorder2.Controls);
+                    OperateResult.AppendText(">>请输入目标箱号\n", Color.Black);
+                    pa_outboxcode.Focus();
+                    return false;
+                }
                 if (new_pa_downstatus != "0")
                 {
                     OperateResult.AppendText(">>该目标箱号" + pa_outboxcode.Text + "处于下地状态,不允许操作\n", Color.Red, pa_outboxcode);
@@ -367,7 +383,7 @@ namespace UAS_MES_NEW.Packing
             if (e.KeyCode == Keys.Enter)
             {
                 sql.Clear();
-                sql.Append("select pa_id,pa_checkno,PA_MAKECODE,PA_CURRENTQTY pa_qty,PA_PACKTYPE,nvl(PA_DOWNSTATUS,0) PA_DOWNSTATUS,pa_prodcode  pa_macode,pa_salecode,pa_level,pa_custcode,pa_type,pa_packtype,pa_mothercode,pa_weight,pa_nextstep,pa_status,pa_sccode from package where pa_outboxcode='" + ms_outboxcode.Text + "'");
+                sql.Append("select pa_id,pa_checkno,PA_MAKECODE,PA_CURRENTQTY pa_qty,PA_PACKTYPE,nvl(PA_DOWNSTATUS,0) PA_DOWNSTATUS,pa_prodcode  pa_macode,pa_salecode,pa_level,pa_custcode,pa_type,pa_packtype,pa_mothercode,pa_weight,pa_nextstep,pa_status,pa_sccode,pa_iostatus from package where pa_outboxcode='" + ms_outboxcode.Text + "'");
                 DataTable dtbar = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (dtbar.Rows.Count > 0)
                 {

+ 84 - 121
UAS_MES_ZT/FunctionCode/Packing/Packing_PackageCollection.Designer.cs

@@ -57,7 +57,6 @@
             this.Port = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.IP = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.pa_remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.groupBoxWithBorder2 = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.PrintNum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.label1 = new System.Windows.Forms.Label();
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
@@ -76,7 +75,6 @@
             this.Printing = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.PrintList_label = new System.Windows.Forms.Label();
             this.PrintNum_label = new System.Windows.Forms.Label();
-            this.groupBoxWithBorder1 = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.locksalecode = new System.Windows.Forms.CheckBox();
             this.PreFix_label = new System.Windows.Forms.Label();
             this.PreFix = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
@@ -108,8 +106,6 @@
             this.pd_innerqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pa_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.groupBoxWithBorder2.SuspendLayout();
-            this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
             this.SuspendLayout();
             // 
@@ -447,36 +443,6 @@
             this.pa_remark.TabIndex = 200;
             this.pa_remark.KeyDown += new System.Windows.Forms.KeyEventHandler(this.pa_remark_KeyDown);
             // 
-            // groupBoxWithBorder2
-            // 
-            this.groupBoxWithBorder2.BorderColor = System.Drawing.Color.Black;
-            this.groupBoxWithBorder2.Controls.Add(this.PrintNum);
-            this.groupBoxWithBorder2.Controls.Add(this.label1);
-            this.groupBoxWithBorder2.Controls.Add(this.StepCount);
-            this.groupBoxWithBorder2.Controls.Add(this.checkweightlabel);
-            this.groupBoxWithBorder2.Controls.Add(this.ob_nowcheckqty);
-            this.groupBoxWithBorder2.Controls.Add(this.ob_batchqty);
-            this.groupBoxWithBorder2.Controls.Add(this.ob_nowcheckqty_label);
-            this.groupBoxWithBorder2.Controls.Add(this.ob_batchqty_label);
-            this.groupBoxWithBorder2.Controls.Add(this.ob_checkno);
-            this.groupBoxWithBorder2.Controls.Add(this.SendCheck);
-            this.groupBoxWithBorder2.Controls.Add(this.Packing);
-            this.groupBoxWithBorder2.Controls.Add(this.PrintLabel);
-            this.groupBoxWithBorder2.Controls.Add(this.label3);
-            this.groupBoxWithBorder2.Controls.Add(this.AutoPrint);
-            this.groupBoxWithBorder2.Controls.Add(this.PrintList);
-            this.groupBoxWithBorder2.Controls.Add(this.Printing);
-            this.groupBoxWithBorder2.Controls.Add(this.PrintList_label);
-            this.groupBoxWithBorder2.Controls.Add(this.PrintNum_label);
-            this.groupBoxWithBorder2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder2.Location = new System.Drawing.Point(636, 9);
-            this.groupBoxWithBorder2.Name = "groupBoxWithBorder2";
-            this.groupBoxWithBorder2.Size = new System.Drawing.Size(669, 252);
-            this.groupBoxWithBorder2.TabIndex = 172;
-            this.groupBoxWithBorder2.TabStop = false;
-            this.groupBoxWithBorder2.Text = "打印";
-            this.groupBoxWithBorder2.TextColor = System.Drawing.Color.Black;
-            // 
             // PrintNum
             // 
             this.PrintNum.AllPower = null;
@@ -484,7 +450,7 @@
             this.PrintNum.Enabled = false;
             this.PrintNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(382, 195);
+            this.PrintNum.Location = new System.Drawing.Point(1032, 201);
             this.PrintNum.Margin = new System.Windows.Forms.Padding(4);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
@@ -498,7 +464,7 @@
             // 
             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(396, 21);
+            this.label1.Location = new System.Drawing.Point(1046, 27);
             this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(110, 31);
@@ -508,10 +474,10 @@
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(183, 27);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 10, 4, 10);
+            this.StepCount.Location = new System.Drawing.Point(833, 33);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
             this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(94, 34);
+            this.StepCount.Size = new System.Drawing.Size(60, 20);
             this.StepCount.Source = null;
             this.StepCount.StepCode = null;
             this.StepCount.TabIndex = 193;
@@ -521,18 +487,18 @@
             this.checkweightlabel.AutoSize = true;
             this.checkweightlabel.CutLength = null;
             this.checkweightlabel.ForeColor = System.Drawing.Color.Red;
-            this.checkweightlabel.Location = new System.Drawing.Point(39, 33);
+            this.checkweightlabel.Location = new System.Drawing.Point(689, 39);
             this.checkweightlabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.checkweightlabel.MaximumSize = new System.Drawing.Size(300, 0);
             this.checkweightlabel.Name = "checkweightlabel";
-            this.checkweightlabel.Size = new System.Drawing.Size(0, 31);
+            this.checkweightlabel.Size = new System.Drawing.Size(0, 18);
             this.checkweightlabel.TabIndex = 180;
             // 
             // ob_nowcheckqty
             // 
             this.ob_nowcheckqty.AutoSize = true;
             this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(516, 129);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(1166, 135);
             this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
             this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 31);
@@ -542,7 +508,7 @@
             // 
             this.ob_batchqty.AutoSize = true;
             this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty.Location = new System.Drawing.Point(516, 72);
+            this.ob_batchqty.Location = new System.Drawing.Point(1166, 78);
             this.ob_batchqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Size = new System.Drawing.Size(0, 31);
@@ -552,7 +518,7 @@
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
             this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(396, 129);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(1046, 135);
             this.ob_nowcheckqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
             this.ob_nowcheckqty_label.Size = new System.Drawing.Size(110, 31);
@@ -563,7 +529,7 @@
             // 
             this.ob_batchqty_label.AutoSize = true;
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty_label.Location = new System.Drawing.Point(396, 75);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(1046, 81);
             this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
             this.ob_batchqty_label.Size = new System.Drawing.Size(110, 31);
@@ -574,7 +540,7 @@
             // 
             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.Location = new System.Drawing.Point(516, 21);
+            this.ob_checkno.Location = new System.Drawing.Point(1166, 27);
             this.ob_checkno.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Size = new System.Drawing.Size(0, 31);
@@ -590,7 +556,7 @@
             this.SendCheck.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.SendCheck.Image = null;
             this.SendCheck.IsShowBorder = true;
-            this.SendCheck.Location = new System.Drawing.Point(555, 195);
+            this.SendCheck.Location = new System.Drawing.Point(1205, 201);
             this.SendCheck.Margin = new System.Windows.Forms.Padding(4);
             this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
             this.SendCheck.Name = "SendCheck";
@@ -611,7 +577,7 @@
             this.Packing.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.Packing.Image = null;
             this.Packing.IsShowBorder = true;
-            this.Packing.Location = new System.Drawing.Point(22, 195);
+            this.Packing.Location = new System.Drawing.Point(672, 201);
             this.Packing.Margin = new System.Windows.Forms.Padding(4);
             this.Packing.MoveImage = ((System.Drawing.Image)(resources.GetObject("Packing.MoveImage")));
             this.Packing.Name = "Packing";
@@ -628,7 +594,7 @@
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(183, 130);
+            this.PrintLabel.Location = new System.Drawing.Point(833, 136);
             this.PrintLabel.Name = "PrintLabel";
             this.PrintLabel.Size = new System.Drawing.Size(202, 32);
             this.PrintLabel.TabIndex = 159;
@@ -638,7 +604,7 @@
             // 
             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(9, 132);
+            this.label3.Location = new System.Drawing.Point(659, 138);
             this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(110, 31);
@@ -648,16 +614,15 @@
             // AutoPrint
             // 
             this.AutoPrint.Checked = false;
-            this.AutoPrint.Location = new System.Drawing.Point(124, 196);
-            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
+            this.AutoPrint.Location = new System.Drawing.Point(774, 202);
             this.AutoPrint.Name = "AutoPrint";
-            this.AutoPrint.Size = new System.Drawing.Size(135, 34);
+            this.AutoPrint.Size = new System.Drawing.Size(167, 35);
             this.AutoPrint.TabIndex = 166;
             // 
             // PrintList
             // 
             this.PrintList.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.PrintList.Location = new System.Drawing.Point(183, 75);
+            this.PrintList.Location = new System.Drawing.Point(833, 81);
             this.PrintList.Margin = new System.Windows.Forms.Padding(9, 10, 9, 10);
             this.PrintList.Name = "PrintList";
             this.PrintList.Size = new System.Drawing.Size(204, 42);
@@ -671,7 +636,7 @@
             this.Printing.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.Printing.Image = null;
             this.Printing.IsShowBorder = true;
-            this.Printing.Location = new System.Drawing.Point(466, 195);
+            this.Printing.Location = new System.Drawing.Point(1116, 201);
             this.Printing.Margin = new System.Windows.Forms.Padding(4);
             this.Printing.MoveImage = ((System.Drawing.Image)(resources.GetObject("Printing.MoveImage")));
             this.Printing.Name = "Printing";
@@ -688,7 +653,7 @@
             // 
             this.PrintList_label.AutoSize = true;
             this.PrintList_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintList_label.Location = new System.Drawing.Point(9, 72);
+            this.PrintList_label.Location = new System.Drawing.Point(659, 78);
             this.PrintList_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.PrintList_label.Name = "PrintList_label";
             this.PrintList_label.Size = new System.Drawing.Size(134, 31);
@@ -699,52 +664,19 @@
             // 
             this.PrintNum_label.AutoSize = true;
             this.PrintNum_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintNum_label.Location = new System.Drawing.Point(309, 192);
+            this.PrintNum_label.Location = new System.Drawing.Point(959, 198);
             this.PrintNum_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.PrintNum_label.Name = "PrintNum_label";
             this.PrintNum_label.Size = new System.Drawing.Size(62, 31);
             this.PrintNum_label.TabIndex = 124;
             this.PrintNum_label.Text = "份数";
             // 
-            // groupBoxWithBorder1
-            // 
-            this.groupBoxWithBorder1.BorderColor = System.Drawing.Color.Black;
-            this.groupBoxWithBorder1.Controls.Add(this.locksalecode);
-            this.groupBoxWithBorder1.Controls.Add(this.PreFix_label);
-            this.groupBoxWithBorder1.Controls.Add(this.PreFix);
-            this.groupBoxWithBorder1.Controls.Add(this.pa_salecode_label);
-            this.groupBoxWithBorder1.Controls.Add(this.ma_code_label);
-            this.groupBoxWithBorder1.Controls.Add(this.ms_salecode);
-            this.groupBoxWithBorder1.Controls.Add(this.ms_makecode);
-            this.groupBoxWithBorder1.Controls.Add(this.OutBoxLength_label);
-            this.groupBoxWithBorder1.Controls.Add(this.OutBoxLength);
-            this.groupBoxWithBorder1.Controls.Add(this.pr_outboxinnerqty);
-            this.groupBoxWithBorder1.Controls.Add(this.DeleteAll);
-            this.groupBoxWithBorder1.Controls.Add(this.AutoGenBoxCode);
-            this.groupBoxWithBorder1.Controls.Add(this.pa_currentqty_label);
-            this.groupBoxWithBorder1.Controls.Add(this.pr_detail_label);
-            this.groupBoxWithBorder1.Controls.Add(this.pa_outboxcode);
-            this.groupBoxWithBorder1.Controls.Add(this.pa_currentqty);
-            this.groupBoxWithBorder1.Controls.Add(this.pr_code_label);
-            this.groupBoxWithBorder1.Controls.Add(this.pr_detail);
-            this.groupBoxWithBorder1.Controls.Add(this.pr_outboxinnerqty_label);
-            this.groupBoxWithBorder1.Controls.Add(this.pr_code);
-            this.groupBoxWithBorder1.Controls.Add(this.pa_code_label);
-            this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder1.Location = new System.Drawing.Point(6, 9);
-            this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Size = new System.Drawing.Size(616, 252);
-            this.groupBoxWithBorder1.TabIndex = 171;
-            this.groupBoxWithBorder1.TabStop = false;
-            this.groupBoxWithBorder1.Text = "装箱信息";
-            this.groupBoxWithBorder1.TextColor = System.Drawing.Color.Black;
-            // 
             // locksalecode
             // 
             this.locksalecode.AutoSize = true;
             this.locksalecode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.locksalecode.ForeColor = System.Drawing.Color.Red;
-            this.locksalecode.Location = new System.Drawing.Point(435, 24);
+            this.locksalecode.Location = new System.Drawing.Point(446, 36);
             this.locksalecode.Margin = new System.Windows.Forms.Padding(4);
             this.locksalecode.Name = "locksalecode";
             this.locksalecode.Size = new System.Drawing.Size(142, 22);
@@ -756,7 +688,7 @@
             // 
             this.PreFix_label.AutoSize = true;
             this.PreFix_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PreFix_label.Location = new System.Drawing.Point(267, 21);
+            this.PreFix_label.Location = new System.Drawing.Point(278, 33);
             this.PreFix_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.PreFix_label.Name = "PreFix_label";
             this.PreFix_label.Size = new System.Drawing.Size(54, 28);
@@ -769,7 +701,7 @@
             this.PreFix.BackColor = System.Drawing.Color.White;
             this.PreFix.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.PreFix.ID = null;
-            this.PreFix.Location = new System.Drawing.Point(338, 22);
+            this.PreFix.Location = new System.Drawing.Point(349, 34);
             this.PreFix.Margin = new System.Windows.Forms.Padding(9, 10, 9, 10);
             this.PreFix.Name = "PreFix";
             this.PreFix.Power = null;
@@ -784,7 +716,7 @@
             // 
             this.pa_salecode_label.AutoSize = true;
             this.pa_salecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_salecode_label.Location = new System.Drawing.Point(312, 204);
+            this.pa_salecode_label.Location = new System.Drawing.Point(323, 216);
             this.pa_salecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_salecode_label.Name = "pa_salecode_label";
             this.pa_salecode_label.Size = new System.Drawing.Size(110, 31);
@@ -795,7 +727,7 @@
             // 
             this.ma_code_label.AutoSize = true;
             this.ma_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code_label.Location = new System.Drawing.Point(6, 204);
+            this.ma_code_label.Location = new System.Drawing.Point(17, 216);
             this.ma_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_code_label.Name = "ma_code_label";
             this.ma_code_label.Size = new System.Drawing.Size(86, 31);
@@ -806,7 +738,7 @@
             // 
             this.ms_salecode.AutoSize = true;
             this.ms_salecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_salecode.Location = new System.Drawing.Point(435, 204);
+            this.ms_salecode.Location = new System.Drawing.Point(446, 216);
             this.ms_salecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_salecode.Name = "ms_salecode";
             this.ms_salecode.Size = new System.Drawing.Size(0, 31);
@@ -816,7 +748,7 @@
             // 
             this.ms_makecode.AutoSize = true;
             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(135, 204);
+            this.ms_makecode.Location = new System.Drawing.Point(146, 216);
             this.ms_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_makecode.MaximumSize = new System.Drawing.Size(225, 0);
             this.ms_makecode.Name = "ms_makecode";
@@ -827,7 +759,7 @@
             // 
             this.OutBoxLength_label.AutoSize = true;
             this.OutBoxLength_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLength_label.Location = new System.Drawing.Point(120, 21);
+            this.OutBoxLength_label.Location = new System.Drawing.Point(131, 33);
             this.OutBoxLength_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.OutBoxLength_label.Name = "OutBoxLength_label";
             this.OutBoxLength_label.Size = new System.Drawing.Size(54, 28);
@@ -840,7 +772,7 @@
             this.OutBoxLength.BackColor = System.Drawing.Color.White;
             this.OutBoxLength.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.OutBoxLength.ID = null;
-            this.OutBoxLength.Location = new System.Drawing.Point(190, 22);
+            this.OutBoxLength.Location = new System.Drawing.Point(201, 34);
             this.OutBoxLength.Margin = new System.Windows.Forms.Padding(9, 10, 9, 10);
             this.OutBoxLength.Name = "OutBoxLength";
             this.OutBoxLength.Power = null;
@@ -858,7 +790,7 @@
             this.pr_outboxinnerqty.Enabled = false;
             this.pr_outboxinnerqty.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_outboxinnerqty.ID = null;
-            this.pr_outboxinnerqty.Location = new System.Drawing.Point(135, 111);
+            this.pr_outboxinnerqty.Location = new System.Drawing.Point(146, 123);
             this.pr_outboxinnerqty.Margin = new System.Windows.Forms.Padding(4);
             this.pr_outboxinnerqty.Name = "pr_outboxinnerqty";
             this.pr_outboxinnerqty.Power = null;
@@ -876,7 +808,7 @@
             this.DeleteAll.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.DeleteAll.Image = null;
             this.DeleteAll.IsShowBorder = true;
-            this.DeleteAll.Location = new System.Drawing.Point(532, 63);
+            this.DeleteAll.Location = new System.Drawing.Point(543, 75);
             this.DeleteAll.Margin = new System.Windows.Forms.Padding(4);
             this.DeleteAll.MoveImage = ((System.Drawing.Image)(resources.GetObject("DeleteAll.MoveImage")));
             this.DeleteAll.Name = "DeleteAll";
@@ -893,9 +825,9 @@
             this.AutoGenBoxCode.AutoSize = true;
             this.AutoGenBoxCode.Checked = true;
             this.AutoGenBoxCode.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.AutoGenBoxCode.Location = new System.Drawing.Point(369, 66);
+            this.AutoGenBoxCode.Location = new System.Drawing.Point(380, 78);
             this.AutoGenBoxCode.Name = "AutoGenBoxCode";
-            this.AutoGenBoxCode.Size = new System.Drawing.Size(136, 35);
+            this.AutoGenBoxCode.Size = new System.Drawing.Size(106, 22);
             this.AutoGenBoxCode.TabIndex = 171;
             this.AutoGenBoxCode.Text = "自动生成";
             this.AutoGenBoxCode.UseVisualStyleBackColor = true;
@@ -905,7 +837,7 @@
             // 
             this.pa_currentqty_label.AutoSize = true;
             this.pa_currentqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty_label.Location = new System.Drawing.Point(315, 114);
+            this.pa_currentqty_label.Location = new System.Drawing.Point(326, 126);
             this.pa_currentqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_currentqty_label.Name = "pa_currentqty_label";
             this.pa_currentqty_label.Size = new System.Drawing.Size(110, 31);
@@ -916,7 +848,7 @@
             // 
             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(312, 156);
+            this.pr_detail_label.Location = new System.Drawing.Point(323, 168);
             this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(62, 31);
@@ -930,7 +862,7 @@
             this.pa_outboxcode.Font = new System.Drawing.Font("微软雅黑", 12F);
             this.pa_outboxcode.ForeColor = System.Drawing.Color.Black;
             this.pa_outboxcode.ID = null;
-            this.pa_outboxcode.Location = new System.Drawing.Point(135, 63);
+            this.pa_outboxcode.Location = new System.Drawing.Point(146, 75);
             this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(9, 10, 9, 10);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = null;
@@ -945,7 +877,7 @@
             // 
             this.pa_currentqty.AutoSize = true;
             this.pa_currentqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty.Location = new System.Drawing.Point(432, 111);
+            this.pa_currentqty.Location = new System.Drawing.Point(443, 123);
             this.pa_currentqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_currentqty.Name = "pa_currentqty";
             this.pa_currentqty.Size = new System.Drawing.Size(0, 31);
@@ -955,7 +887,7 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(6, 156);
+            this.pr_code_label.Location = new System.Drawing.Point(17, 168);
             this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_code_label.Name = "pr_code_label";
             this.pr_code_label.Size = new System.Drawing.Size(110, 31);
@@ -966,7 +898,7 @@
             // 
             this.pr_detail.AutoSize = true;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(374, 156);
+            this.pr_detail.Location = new System.Drawing.Point(385, 168);
             this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Size = new System.Drawing.Size(0, 31);
@@ -976,7 +908,7 @@
             // 
             this.pr_outboxinnerqty_label.AutoSize = true;
             this.pr_outboxinnerqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(6, 108);
+            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(17, 120);
             this.pr_outboxinnerqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_outboxinnerqty_label.Name = "pr_outboxinnerqty_label";
             this.pr_outboxinnerqty_label.Size = new System.Drawing.Size(110, 31);
@@ -987,7 +919,7 @@
             // 
             this.pr_code.AutoSize = true;
             this.pr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code.Location = new System.Drawing.Point(135, 156);
+            this.pr_code.Location = new System.Drawing.Point(146, 168);
             this.pr_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_code.MaximumSize = new System.Drawing.Size(225, 0);
             this.pr_code.Name = "pr_code";
@@ -999,7 +931,7 @@
             // 
             this.pa_code_label.AutoSize = true;
             this.pa_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_code_label.Location = new System.Drawing.Point(6, 63);
+            this.pa_code_label.Location = new System.Drawing.Point(17, 75);
             this.pa_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_code_label.Name = "pa_code_label";
             this.pa_code_label.Size = new System.Drawing.Size(62, 31);
@@ -1134,23 +1066,62 @@
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
-            this.ClientSize = new System.Drawing.Size(1318, 890);
+            this.ClientSize = new System.Drawing.Size(1334, 988);
+            this.Controls.Add(this.locksalecode);
+            this.Controls.Add(this.PrintNum);
+            this.Controls.Add(this.PreFix_label);
             this.Controls.Add(this.label2);
+            this.Controls.Add(this.PreFix);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.pa_salecode_label);
             this.Controls.Add(this.Remark_PreFix);
+            this.Controls.Add(this.ma_code_label);
+            this.Controls.Add(this.StepCount);
+            this.Controls.Add(this.ms_salecode);
+            this.Controls.Add(this.checkweightlabel);
+            this.Controls.Add(this.ms_makecode);
             this.Controls.Add(this.AllowRepeat);
+            this.Controls.Add(this.OutBoxLength_label);
+            this.Controls.Add(this.OutBoxLength);
+            this.Controls.Add(this.ob_nowcheckqty);
+            this.Controls.Add(this.pr_outboxinnerqty);
             this.Controls.Add(this.CloseServer);
+            this.Controls.Add(this.DeleteAll);
+            this.Controls.Add(this.ob_batchqty);
+            this.Controls.Add(this.AutoGenBoxCode);
             this.Controls.Add(this.BuildServer);
+            this.Controls.Add(this.pa_currentqty_label);
+            this.Controls.Add(this.ob_nowcheckqty_label);
+            this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.Port);
+            this.Controls.Add(this.pa_outboxcode);
+            this.Controls.Add(this.ob_batchqty_label);
+            this.Controls.Add(this.pa_currentqty);
             this.Controls.Add(this.Port_label);
+            this.Controls.Add(this.pr_code_label);
+            this.Controls.Add(this.ob_checkno);
+            this.Controls.Add(this.pr_detail);
             this.Controls.Add(this.IP);
+            this.Controls.Add(this.pr_outboxinnerqty_label);
+            this.Controls.Add(this.SendCheck);
+            this.Controls.Add(this.pr_code);
             this.Controls.Add(this.IP_label);
+            this.Controls.Add(this.pa_code_label);
+            this.Controls.Add(this.Packing);
             this.Controls.Add(this.CollecRemark);
+            this.Controls.Add(this.PrintLabel);
             this.Controls.Add(this.pa_remark);
+            this.Controls.Add(this.label3);
             this.Controls.Add(this.pa_remark_label);
+            this.Controls.Add(this.AutoPrint);
             this.Controls.Add(this.mcd_remainqty_label);
+            this.Controls.Add(this.PrintList);
             this.Controls.Add(this.mcd_remainqty);
+            this.Controls.Add(this.Printing);
             this.Controls.Add(this.pr_sendchecktype);
+            this.Controls.Add(this.PrintList_label);
             this.Controls.Add(this.mcd_inqty_label);
+            this.Controls.Add(this.PrintNum_label);
             this.Controls.Add(this.pa_standardqty);
             this.Controls.Add(this.mcd_inqty);
             this.Controls.Add(this.pa_downstatus);
@@ -1158,8 +1129,6 @@
             this.Controls.Add(this.pa_sccode);
             this.Controls.Add(this.pa_status);
             this.Controls.Add(this.pr_packrule);
-            this.Controls.Add(this.groupBoxWithBorder2);
-            this.Controls.Add(this.groupBoxWithBorder1);
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.pa_id);
             this.Controls.Add(this.Clean);
@@ -1177,10 +1146,6 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PackCollection_FormClosing);
             this.Load += new System.EventHandler(this.PackCollection_Load);
             this.SizeChanged += new System.EventHandler(this.PackCollection_SizeChanged);
-            this.groupBoxWithBorder2.ResumeLayout(false);
-            this.groupBoxWithBorder2.PerformLayout();
-            this.groupBoxWithBorder1.ResumeLayout(false);
-            this.groupBoxWithBorder1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
@@ -1211,8 +1176,6 @@
         private System.Windows.Forms.Label pr_code;
         private System.Windows.Forms.Label pr_detail;
         private System.Windows.Forms.Label pa_currentqty;
-        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder1;
-        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder2;
         private CustomControl.ButtonUtil.NormalButton Packing;
         private System.Windows.Forms.CheckBox AutoGenBoxCode;
         private System.Windows.Forms.Label pr_packrule;

+ 3 - 3
UAS_MES_ZT/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -163,7 +163,7 @@ namespace UAS_MES_NEW.Packing
                     //{
                         if (Print.SinglePrint(Tag.ToString(),  engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
                         {
-                            OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
+                            OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Aqua);
                         }
                         else
                         {
@@ -464,7 +464,7 @@ namespace UAS_MES_NEW.Packing
                                     if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) == int.Parse(pr_outboxinnerqty.Text))
                                     {
                                         dh.UpdateByCondition("package", "pa_status=1,pa_packageqty=pa_currentqty,pa_totalqty=pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'");
-                                        OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "满箱采集完成,封箱成功\n", Color.Green);
+                                        OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "满箱采集完成,封箱成功\n", Color.ForestGreen);
                                         pa_status.Text = "1";
                                         pa_standardqty.Text = "";
                                         if (!CollecRemark.Checked)
@@ -596,7 +596,7 @@ namespace UAS_MES_NEW.Packing
                 string Seal = MessageBox.Show(this.ParentForm, "是否确认封箱?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
                 if (Seal == "Yes")
                 {
-                    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "采集完成,手动封箱成功\n", Color.Green);
+                    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "采集完成,手动封箱成功\n", Color.ForestGreen);
                     dh.UpdateByCondition("package", "pa_status=1,pa_totalqty=pa_currentqty,pa_packageqty=pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'");
                     pa_status.Text = "1";
                     pa_standardqty.Text = "";

+ 3 - 3
UAS_MES_ZT/FunctionCode/Packing/Packing_PackageCollectionWeigh.cs

@@ -235,7 +235,7 @@ namespace UAS_MES_NEW.Packing
                     //doc = lbl.Documents.Open(PrintLabel.Text);
                     if (Print.SinglePrint(Tag.ToString(),  engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
                     {
-                        OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
+                        OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Aqua);
                     }
                     else
                     {
@@ -503,7 +503,7 @@ namespace UAS_MES_NEW.Packing
                                         dh.UpdateByCondition("package", "pa_status=1,pa_totalqty=pa_currentqty,pa_packageqty=pa_currentqty,pa_weight=" + weigh + "", "pa_outboxcode='" + pa_outboxcode.Text + "'");
                                         pa_standardqty.Text = "";
                                         pa_status.Text = "1";
-                                        OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "满箱封箱成功\n", Color.Green);
+                                        OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "满箱封箱成功\n", Color.ForestGreen);
                                         LogicHandler.RecordProdWeight(pa_outboxcode.Text, "CARTON", float.Parse(ActWeigh.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
                                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱称重", "称量完成:" + weight.Text.Trim(), pa_outboxcode.Text, "");
                                         if (LogicHandler.OutBoxStepPass(pa_outboxcode.Text, ms_makecode, User.UserSourceCode, User.UserCode, "卡通箱:" + pa_outboxcode.Text + "整箱过站", "卡通箱整箱过站", out ErrorMessage))
@@ -640,7 +640,7 @@ namespace UAS_MES_NEW.Packing
                     pa_status.Text = "1";
                     pa_standardqty.Text = "";
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "封箱成功", pa_outboxcode.Text, "");
-                    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "封箱成功\n", Color.Green);
+                    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "封箱成功\n", Color.ForestGreen);
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱称重", "称量完成:" + weight.Text.Trim(), pa_outboxcode.Text, "");
                     LogicHandler.RecordProdWeight(pa_outboxcode.Text, "CARTON", float.Parse(ActWeigh.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
                     string ms_makecode = dh.getFieldDataByCondition("packagedetail", "pd_makecode", "pd_outboxcode = '" + pa_outboxcode.Text + "'").ToString();

+ 13 - 7
UAS_MES_ZT/FunctionCode/Query/BadItem.Designer.cs

@@ -31,7 +31,7 @@
             this.Data = new System.Windows.Forms.DataGridView();
             this.detno = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mb_badname = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.times = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.times = new System.Windows.Forms.DataGridViewLinkColumn();
             this.sums = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.rate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.Data)).BeginInit();
@@ -47,22 +47,25 @@
             this.times,
             this.sums,
             this.rate});
-            this.Data.Location = new System.Drawing.Point(12, 28);
+            this.Data.Location = new System.Drawing.Point(9, 21);
+            this.Data.Margin = new System.Windows.Forms.Padding(2);
             this.Data.Name = "Data";
             this.Data.RowTemplate.Height = 37;
-            this.Data.Size = new System.Drawing.Size(1706, 1109);
+            this.Data.Size = new System.Drawing.Size(1280, 832);
             this.Data.TabIndex = 221;
+            this.Data.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.Data_CellContentClick);
             // 
             // detno
             // 
             this.detno.DataPropertyName = "detno";
             this.detno.HeaderText = "detno";
             this.detno.Name = "detno";
+            this.detno.Visible = false;
             // 
             // mb_badname
             // 
             this.mb_badname.DataPropertyName = "mb_badname";
-            this.mb_badname.HeaderText = "工序";
+            this.mb_badname.HeaderText = "不良";
             this.mb_badname.Name = "mb_badname";
             // 
             // times
@@ -70,6 +73,8 @@
             this.times.DataPropertyName = "times";
             this.times.HeaderText = "出现次数";
             this.times.Name = "times";
+            this.times.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.times.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
             // 
             // sums
             // 
@@ -85,10 +90,11 @@
             // 
             // BadItem
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1730, 1149);
+            this.ClientSize = new System.Drawing.Size(1298, 862);
             this.Controls.Add(this.Data);
+            this.Margin = new System.Windows.Forms.Padding(2);
             this.Name = "BadItem";
             this.Text = "不良代码数据";
             this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
@@ -104,7 +110,7 @@
         private System.Windows.Forms.DataGridView Data;
         private System.Windows.Forms.DataGridViewTextBoxColumn detno;
         private System.Windows.Forms.DataGridViewTextBoxColumn mb_badname;
-        private System.Windows.Forms.DataGridViewTextBoxColumn times;
+        private System.Windows.Forms.DataGridViewLinkColumn times;
         private System.Windows.Forms.DataGridViewTextBoxColumn sums;
         private System.Windows.Forms.DataGridViewTextBoxColumn rate;
     }

+ 46 - 3
UAS_MES_ZT/FunctionCode/Query/BadItem.cs

@@ -25,7 +25,8 @@ namespace UAS_MES_NEW.Query
         string _begindate;
         string _enddate;
         string _stepcode;
-        public BadItem(string linecode, string prodcode, string wccode, string begindate, string enddate, string stepcode)
+        string _makind;
+        public BadItem(string linecode, string prodcode, string wccode, string begindate, string enddate, string stepcode,string makind)
         {
             InitializeComponent();
             _linecode = linecode;
@@ -34,6 +35,7 @@ namespace UAS_MES_NEW.Query
             _begindate = begindate;
             _enddate = enddate;
             _stepcode = stepcode;
+            _makind = makind;
         }
 
         private void BadItem_SizeChanged(object sender, EventArgs e)
@@ -43,7 +45,7 @@ namespace UAS_MES_NEW.Query
 
         private void BadItem_Load(object sender, EventArgs e)
         {
-            string condition = " mb_indate between to_date('" + _begindate + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + _enddate + "', 'yyyy-mm-dd hh24:mi:ss') and mb_stepcode='" + _stepcode + "' ";
+            string condition = " mb_indate between to_date('" + _begindate + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + _enddate + "', 'yyyy-mm-dd hh24:mi:ss')  ";
             if (_prodcode != "")
             {
                 condition += " and ma_prodcode = '" + _prodcode + "'";
@@ -52,11 +54,52 @@ namespace UAS_MES_NEW.Query
             {
                 condition += " and mb_linecode = '" + _linecode + "'";
             }
+            if (_wccode != "")
+            {
+                condition += " and ma_wccode = '" + _wccode + "'";
+            }
+            if (_makind != "")
+            {
+                condition += " and ma_kind = '" + _makind + " '";
+            }
+            if (_stepcode != "")
+            {
+                condition += " and mb_stepcode = '" + _stepcode + "'";
+            }
 
             string v_sql = "";
-            LogicHandler.GetQuerySQL(condition, "不良代码", out v_sql);
+            if (_stepcode != "")
+            {
+                if (_stepcode == "CT1" || _stepcode == "CT2")
+                {
+                    LogicHandler.GetQuerySQL(condition, "不良代码CT", out v_sql);
+                }
+                else
+                {
+                    LogicHandler.GetQuerySQL(condition, "不良代码", out v_sql);
+                }
+            }
+            {
+                LogicHandler.GetQuerySQL(condition, "不良代码ALL", out v_sql);
+            }
             DataTable dt = (DataTable)dh.ExecuteSql(v_sql, "select");
             BaseUtil.FillDgvWithDataTable(Data, dt);
         }
+
+        private void Data_CellContentClick(object sender, DataGridViewCellEventArgs e)
+        {
+            try
+            {
+                if (Data.Columns[e.ColumnIndex].Name == "times"&& _stepcode != "CT1" && _stepcode != "CT2")
+                {
+                    Form badsn = new BadSn(_linecode, _prodcode, _wccode, _begindate, _enddate, _stepcode, _makind, Data.Rows[e.RowIndex].Cells["mb_badname"].Value.ToString());
+                    badsn.Show();
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.Message);
+            }
+        }
     }
 }

+ 122 - 0
UAS_MES_ZT/FunctionCode/Query/BadSn.Designer.cs

@@ -0,0 +1,122 @@
+namespace UAS_MES_NEW.Query
+{
+    partial class BadSn
+    {
+        /// <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.Data = new System.Windows.Forms.DataGridView();
+            this.mb_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mb_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mb_badname = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.em_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mb_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            ((System.ComponentModel.ISupportInitialize)(this.Data)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // Data
+            // 
+            this.Data.AllowUserToAddRows = false;
+            this.Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.Data.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.mb_makecode,
+            this.st_name,
+            this.mb_sncode,
+            this.mb_badname,
+            this.em_name,
+            this.mb_indate});
+            this.Data.Location = new System.Drawing.Point(9, 21);
+            this.Data.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Data.Name = "Data";
+            this.Data.RowTemplate.Height = 37;
+            this.Data.Size = new System.Drawing.Size(1280, 832);
+            this.Data.TabIndex = 221;
+            // 
+            // mb_makecode
+            // 
+            this.mb_makecode.DataPropertyName = "mb_makecode";
+            this.mb_makecode.HeaderText = "工单";
+            this.mb_makecode.Name = "mb_makecode";
+            // 
+            // st_name
+            // 
+            this.st_name.DataPropertyName = "st_name";
+            this.st_name.HeaderText = "工序";
+            this.st_name.Name = "st_name";
+            // 
+            // mb_sncode
+            // 
+            this.mb_sncode.DataPropertyName = "mb_sncode";
+            this.mb_sncode.HeaderText = "SN";
+            this.mb_sncode.Name = "mb_sncode";
+            // 
+            // mb_badname
+            // 
+            this.mb_badname.DataPropertyName = "mb_badname";
+            this.mb_badname.HeaderText = "不良";
+            this.mb_badname.Name = "mb_badname";
+            // 
+            // em_name
+            // 
+            this.em_name.DataPropertyName = "em_name";
+            this.em_name.HeaderText = "录入人";
+            this.em_name.Name = "em_name";
+            // 
+            // mb_indate
+            // 
+            this.mb_indate.DataPropertyName = "mb_indate";
+            this.mb_indate.HeaderText = "录入时间";
+            this.mb_indate.Name = "mb_indate";
+            // 
+            // BadSn
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1298, 862);
+            this.Controls.Add(this.Data);
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Name = "BadSn";
+            this.Text = "不良代码数据";
+            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
+            this.Load += new System.EventHandler(this.BadItem_Load);
+            this.SizeChanged += new System.EventHandler(this.BadItem_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.Data)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.DataGridView Data;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mb_makecode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_name;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mb_sncode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mb_badname;
+        private System.Windows.Forms.DataGridViewTextBoxColumn em_name;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mb_indate;
+    }
+}

+ 84 - 0
UAS_MES_ZT/FunctionCode/Query/BadSn.cs

@@ -0,0 +1,84 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+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.Query
+{
+    public partial class BadSn : Form
+    {
+
+        DataHelper dh = SystemInf.dh;
+
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+
+        string _linecode;
+        string _prodcode;
+        string _wccode;
+        string _begindate;
+        string _enddate;
+        string _stepcode;
+        string _makind;
+        string _badname;
+        public BadSn(string linecode, string prodcode, string wccode, string begindate, string enddate, string stepcode,string makind,string badname)
+        {
+            InitializeComponent();
+            _linecode = linecode;
+            _prodcode = prodcode;
+            _wccode = wccode;
+            _begindate = begindate;
+            _enddate = enddate;
+            _stepcode = stepcode;
+            _makind = makind;
+            _badname = badname;
+        }
+
+        private void BadItem_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        private void BadItem_Load(object sender, EventArgs e)
+        {
+            string condition = " mb_indate between to_date('" + _begindate + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + _enddate + "', 'yyyy-mm-dd hh24:mi:ss')  ";
+            if (_prodcode != "")
+            {
+                condition += " and ma_prodcode = '" + _prodcode + "'";
+            }
+            if (_linecode != "")
+            {
+                condition += " and mb_linecode = '" + _linecode + "'";
+            }
+            if (_wccode != "")
+            {
+                condition += " and ma_wccode = '" + _wccode + "'";
+            }
+            if (_makind != "")
+            {
+                condition += " and ma_kind = '" + _makind + "'";
+            }
+            if (_stepcode != "")
+            {
+                condition += " and mb_stepcode = '" + _stepcode + "'";
+            }
+            if (_badname != "")
+            {
+                condition += " and mb_badname = '" + _badname + "'";
+            }
+
+            string v_sql = "";
+
+            LogicHandler.GetQuerySQL(condition, "不良明细", out v_sql);
+            
+            DataTable dt = (DataTable)dh.ExecuteSql(v_sql, "select");
+            BaseUtil.FillDgvWithDataTable(Data, dt);
+        }
+    }
+}

+ 138 - 0
UAS_MES_ZT/FunctionCode/Query/BadSn.resx

@@ -0,0 +1,138 @@
+<?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="mb_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mb_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mb_badname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="em_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mb_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+</root>

+ 97 - 21
UAS_MES_ZT/FunctionCode/Query/Query_DateRate.Designer.cs

@@ -44,21 +44,26 @@
             this.AGOKQTY = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.SNQTY = new System.Windows.Forms.DataGridViewLinkColumn();
             this.合计 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.报废 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.FIQTY = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.OKRATE = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.BeginDate = new System.Windows.Forms.DateTimePicker();
+            this.label5 = new System.Windows.Forms.Label();
             this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewLinkColumn1 = new System.Windows.Forms.DataGridViewLinkColumn();
             this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ma_kind = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
             this.li_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.wc_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.pr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.Export = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.BeginDate = new System.Windows.Forms.DateTimePicker();
+            this.normalButton1 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             ((System.ComponentModel.ISupportInitialize)(this.Data)).BeginInit();
             this.SuspendLayout();
             // 
@@ -109,7 +114,7 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(702, 11);
+            this.label2.Location = new System.Drawing.Point(661, 10);
             this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(86, 31);
@@ -139,7 +144,7 @@
             this.AGOKQTY,
             this.SNQTY,
             this.合计,
-            this.报废,
+            this.FIQTY,
             this.OKRATE});
             this.Data.Location = new System.Drawing.Point(16, 110);
             this.Data.Margin = new System.Windows.Forms.Padding(2);
@@ -201,12 +206,12 @@
             this.合计.Name = "合计";
             this.合计.ReadOnly = true;
             // 
-            // 报废
+            // FIQTY
             // 
-            this.报废.DataPropertyName = "报废";
-            this.报废.HeaderText = "报废";
-            this.报废.Name = "报废";
-            this.报废.ReadOnly = true;
+            this.FIQTY.DataPropertyName = "FIQTY";
+            this.FIQTY.HeaderText = "报废";
+            this.FIQTY.Name = "FIQTY";
+            this.FIQTY.ReadOnly = true;
             // 
             // OKRATE
             // 
@@ -214,47 +219,101 @@
             this.OKRATE.HeaderText = "良率";
             this.OKRATE.Name = "OKRATE";
             // 
+            // BeginDate
+            // 
+            this.BeginDate.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+            this.BeginDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+            this.BeginDate.Location = new System.Drawing.Point(409, 64);
+            this.BeginDate.Margin = new System.Windows.Forms.Padding(2);
+            this.BeginDate.Name = "BeginDate";
+            this.BeginDate.Size = new System.Drawing.Size(266, 28);
+            this.BeginDate.TabIndex = 221;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.Location = new System.Drawing.Point(971, 11);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(110, 31);
+            this.label5.TabIndex = 223;
+            this.label5.Text = "工单类型";
+            // 
             // dataGridViewTextBoxColumn1
             // 
             this.dataGridViewTextBoxColumn1.DataPropertyName = "detno";
             this.dataGridViewTextBoxColumn1.HeaderText = "detno";
             this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            this.dataGridViewTextBoxColumn1.ReadOnly = true;
             // 
             // dataGridViewTextBoxColumn2
             // 
             this.dataGridViewTextBoxColumn2.DataPropertyName = "sp_stepname";
             this.dataGridViewTextBoxColumn2.HeaderText = "工序";
             this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            this.dataGridViewTextBoxColumn2.Visible = false;
             // 
             // dataGridViewTextBoxColumn3
             // 
             this.dataGridViewTextBoxColumn3.DataPropertyName = "OKQTY";
             this.dataGridViewTextBoxColumn3.HeaderText = "通过";
             this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            this.dataGridViewTextBoxColumn3.Visible = false;
+            this.dataGridViewTextBoxColumn3.Width = 5;
             // 
             // dataGridViewTextBoxColumn4
             // 
             this.dataGridViewTextBoxColumn4.DataPropertyName = "NGQTY";
             this.dataGridViewTextBoxColumn4.HeaderText = "不良";
             this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
+            this.dataGridViewTextBoxColumn4.ReadOnly = true;
             // 
             // dataGridViewTextBoxColumn5
             // 
             this.dataGridViewTextBoxColumn5.DataPropertyName = "SUMQTY";
             this.dataGridViewTextBoxColumn5.HeaderText = "合计";
             this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
+            this.dataGridViewTextBoxColumn5.ReadOnly = true;
+            // 
+            // dataGridViewLinkColumn1
+            // 
+            this.dataGridViewLinkColumn1.DataPropertyName = "NGQTY";
+            this.dataGridViewLinkColumn1.HeaderText = "不良";
+            this.dataGridViewLinkColumn1.Name = "dataGridViewLinkColumn1";
+            this.dataGridViewLinkColumn1.ReadOnly = true;
+            this.dataGridViewLinkColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.dataGridViewLinkColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
             // 
             // dataGridViewTextBoxColumn6
             // 
             this.dataGridViewTextBoxColumn6.DataPropertyName = "报废";
             this.dataGridViewTextBoxColumn6.HeaderText = "报废";
             this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
+            this.dataGridViewTextBoxColumn6.ReadOnly = true;
             // 
             // dataGridViewTextBoxColumn7
             // 
             this.dataGridViewTextBoxColumn7.DataPropertyName = "OKRATE";
             this.dataGridViewTextBoxColumn7.HeaderText = "直通率";
             this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
+            this.dataGridViewTextBoxColumn7.ReadOnly = true;
+            // 
+            // dataGridViewTextBoxColumn8
+            // 
+            this.dataGridViewTextBoxColumn8.DataPropertyName = "OKRATE";
+            this.dataGridViewTextBoxColumn8.HeaderText = "良率";
+            this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
+            // 
+            // ma_kind
+            // 
+            this.ma_kind.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_kind.FormattingEnabled = true;
+            this.ma_kind.Location = new System.Drawing.Point(1078, 11);
+            this.ma_kind.Margin = new System.Windows.Forms.Padding(4);
+            this.ma_kind.Name = "ma_kind";
+            this.ma_kind.Size = new System.Drawing.Size(262, 30);
+            this.ma_kind.TabIndex = 222;
             // 
             // li_code
             // 
@@ -285,7 +344,7 @@
             this.ma_code.DBTitle = "";
             this.ma_code.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(796, 12);
+            this.ma_code.Location = new System.Drawing.Point(755, 11);
             this.ma_code.Margin = new System.Windows.Forms.Padding(4);
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = "";
@@ -359,21 +418,33 @@
             this.Export.UseVisualStyleBackColor = false;
             this.Export.Click += new System.EventHandler(this.Export_Click);
             // 
-            // BeginDate
-            // 
-            this.BeginDate.CustomFormat = "yyyy-MM-dd HH:mm:ss";
-            this.BeginDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
-            this.BeginDate.Location = new System.Drawing.Point(409, 64);
-            this.BeginDate.Margin = new System.Windows.Forms.Padding(2);
-            this.BeginDate.Name = "BeginDate";
-            this.BeginDate.Size = new System.Drawing.Size(266, 28);
-            this.BeginDate.TabIndex = 221;
+            // normalButton1
+            // 
+            this.normalButton1.AllPower = null;
+            this.normalButton1.BackColor = System.Drawing.Color.Transparent;
+            this.normalButton1.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.DownImage")));
+            this.normalButton1.Image = null;
+            this.normalButton1.IsShowBorder = true;
+            this.normalButton1.Location = new System.Drawing.Point(1139, 62);
+            this.normalButton1.Margin = new System.Windows.Forms.Padding(4);
+            this.normalButton1.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.MoveImage")));
+            this.normalButton1.Name = "normalButton1";
+            this.normalButton1.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.NormalImage")));
+            this.normalButton1.Power = null;
+            this.normalButton1.Size = new System.Drawing.Size(92, 36);
+            this.normalButton1.TabIndex = 224;
+            this.normalButton1.Text = "导出";
+            this.normalButton1.UseVisualStyleBackColor = false;
+            this.normalButton1.Click += new System.EventHandler(this.normalButton1_Click);
             // 
             // Query_DateRate
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1342, 806);
+            this.Controls.Add(this.normalButton1);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.ma_kind);
             this.Controls.Add(this.BeginDate);
             this.Controls.Add(this.Data);
             this.Controls.Add(this.li_code);
@@ -422,6 +493,11 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
+        private System.Windows.Forms.DateTimePicker BeginDate;
+        private System.Windows.Forms.DataGridViewLinkColumn dataGridViewLinkColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;
+        private CustomControl.ComBoxWithFocus.ComBoxWithFocus ma_kind;
+        private System.Windows.Forms.Label label5;
         private System.Windows.Forms.DataGridViewTextBoxColumn st_name;
         private System.Windows.Forms.DataGridViewTextBoxColumn st_ifcalc;
         private System.Windows.Forms.DataGridViewTextBoxColumn sp_stepcode;
@@ -429,8 +505,8 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn AGOKQTY;
         private System.Windows.Forms.DataGridViewLinkColumn SNQTY;
         private System.Windows.Forms.DataGridViewTextBoxColumn 合计;
-        private System.Windows.Forms.DataGridViewTextBoxColumn 报废;
+        private System.Windows.Forms.DataGridViewTextBoxColumn FIQTY;
         private System.Windows.Forms.DataGridViewTextBoxColumn OKRATE;
-        private System.Windows.Forms.DateTimePicker BeginDate;
+        private CustomControl.ButtonUtil.NormalButton normalButton1;
     }
 }

+ 61 - 1
UAS_MES_ZT/FunctionCode/Query/Query_DateRate.cs

@@ -25,6 +25,8 @@ namespace UAS_MES_NEW.Query
 
         DataTable Dbfind;
 
+        LogStringBuilder sql = new LogStringBuilder();
+
         public Query_DateRate()
         {
             InitializeComponent();
@@ -62,6 +64,18 @@ namespace UAS_MES_NEW.Query
             ma_code.SetValueField = new string[] { "ma_code", "wc_code" };
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += pr_code_DbChange;
+
+            //如果ms_makecode的值修改过再去查询
+            sql.Clear();
+            sql.Append("select distinct ma_kind from make");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            ma_kind.DisplayMember = "ma_kind";
+            ma_kind.ValueMember = "ma_kind";
+            ma_kind.DataSource = dt;
+            ma_kind.Text = "";
+
+            //BeginDate.Value = new DateTime(now.year, Now.Month, now.day);
+
         }
 
         private void Export_Click(object sender, EventArgs e)
@@ -95,12 +109,35 @@ namespace UAS_MES_NEW.Query
             {
                 condition += " and sp_linecode = '" + li_code.Text + "'";
             }
+            if (ma_kind.Text != "")
+            {
+                condition += " and ma_kind = '" + ma_kind.Text + "'";
+            }
             string v_sql = "";
             //string v_sql1 = "";
             LogicHandler.GetQuerySQL(condition, "直通率", out v_sql);
             DataTable dt = (DataTable)dh.ExecuteSql(v_sql, "select");
+            double agsum = 0;
+            double bdsum = 0;
+            double fisum = 0;
+            double rate = 1;
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                agsum = agsum + double.Parse(dt.Rows[i]["AGOKQTY"].ToString());
+                bdsum = bdsum + double.Parse(dt.Rows[i]["NGQTY"].ToString());
+                fisum = fisum + double.Parse(dt.Rows[i]["FIQTY"].ToString());
+                if (dt.Rows[i]["ST_IFCALC"].ToString() == "-1")
+                {
+                    rate = rate * (double.Parse(dt.Rows[i]["OKRATE"].ToString()) / 100);
+                }
+            }
+            rate = rate * 100;
             DataRow dr = dt.NewRow();
             dr[3] = "ALL";
+            dr[7] = agsum;
+            dr[8] = bdsum;
+            dr[9] = fisum;
+            dr[10] = String.Format("{0:F}", rate);
             dt.Rows.InsertAt(dr, dt.Rows.Count);
             BaseUtil.FillDgvWithDataTable(Data, dt);
         }
@@ -117,7 +154,7 @@ namespace UAS_MES_NEW.Query
             {
                 if (Data.Columns[e.ColumnIndex].Name == "SNQTY")
                 {
-                    Form baditem = new BadItem(li_code.Text, pr_code.Text, wc_code.Text, BeginDate.Value.ToString("yyyy-MM-dd HH:mm:ss"), EndDate.Value.ToString("yyyy-MM-dd HH:mm:ss"), Data.Rows[e.RowIndex].Cells["sp_stepcode"].Value.ToString());
+                    Form baditem = new BadItem(li_code.Text, pr_code.Text, wc_code.Text, BeginDate.Value.ToString("yyyy-MM-dd HH:mm:ss"), EndDate.Value.ToString("yyyy-MM-dd HH:mm:ss"), Data.Rows[e.RowIndex].Cells["sp_stepcode"].Value.ToString(),ma_kind.Text);
                     baditem.Show();
                 }
             }
@@ -132,5 +169,28 @@ namespace UAS_MES_NEW.Query
         {
             asc.controlAutoSize(this);
         }
+
+        private void normalButton1_Click(object sender, EventArgs e)
+        {
+            //Data表示导出数据
+            //Templet表示导出模板
+            folderBrowserDialog1.Description = "选择导出的路径";
+            DialogResult result = folderBrowserDialog1.ShowDialog();
+            if (result == DialogResult.OK)
+            {
+                string FolderPath = folderBrowserDialog1.SelectedPath;
+                ExcelHandler eh = new ExcelHandler();
+                DataTable dt = (DataTable)Data.DataSource;
+                //导出Excel的时候返回一个文件名,用户选择是否打开
+                string filePath = eh.ExportExcel(dt, FolderPath);
+                //用户选择导出之后是否立即打开
+                MessageBoxButtons messButton = MessageBoxButtons.YesNo;
+                string openFile = MessageBox.Show(this.ParentForm, "是否打开文件" + filePath, "提示", messButton).ToString();
+                if (openFile == "Yes")
+                {
+                    System.Diagnostics.Process.Start(filePath);
+                }
+            }
+        }
     }
 }

+ 39 - 1
UAS_MES_ZT/FunctionCode/Query/Query_DateRate.resx

@@ -141,7 +141,7 @@
   <metadata name="合计.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="报废.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="FIQTY.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <metadata name="OKRATE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -184,6 +184,44 @@
         2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
         zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="normalButton1.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="normalButton1.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="normalButton1.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>

+ 27 - 5
UAS_MES_ZT/FunctionCode/Special/Special_ReSNBD.cs

@@ -51,6 +51,10 @@ namespace UAS_MES_NEW.Special
             ChangeResult.Enabled = true;
         }
 
+        string makecode;
+        string prodcode;
+        string orispeccode;
+
         private void sncode_KeyDown(object sender, KeyEventArgs e)
         {
             if (e.KeyCode == Keys.Enter)
@@ -61,11 +65,29 @@ namespace UAS_MES_NEW.Special
                     {
                         if (!ChangeResult.Checked)
                         {
+
                             if (!dh.CheckExist("makeserial", "ms_sncode = '" + sncode.Text + "'"))
                             {
-                                OperateResult.AppendText(">>SN"+sncode.Text+"未查询到生产记录,无法采集\n", Color.Red, sncode);
-                                return;
+                                if (!dh.CheckExist("AFSALES", "as_sn = '" + sncode.Text + "'"))
+                                {
+                                    OperateResult.AppendText(">>SN" + sncode.Text + "未查询到生产记录以及售后判定记录,无法采集\n", Color.Red, sncode);
+                                    return;
+                                }
+                                else
+                                {
+                                    makecode = "";
+                                    prodcode = "";
+                                    orispeccode = "";
+                                }
                             }
+                            else
+                            {
+                                DataTable dt = (DataTable)dh.ExecuteSql("select * from makeserial left join product on ms_prodcode  = pr_code where ms_sncode = '"+sncode.Text+"' order by ms_id desc", "select");
+                                makecode = dt.Rows[0]["ms_makecode"].ToString();
+                                prodcode = dt.Rows[0]["ms_prodcode"].ToString();
+                                orispeccode = dt.Rows[0]["pr_orispeccode"].ToString();
+                            }
+
                             if (dh.CheckExist("returnsnbd", "rsb_oldsn = '" + sncode.Text + "'"))
                             {
                                 string newsn = dh.getFieldDataByCondition("returnsnbd", "rsb_newsn", "rsb_oldsn = '" + sncode.Text + "'").ToString();
@@ -104,10 +126,10 @@ namespace UAS_MES_NEW.Special
                                 OperateResult.AppendText(">>采集新SN:" + sncode.Text + "已关联返修SN:" + oldsn + ",无法采集\n", Color.Red, sncode);
                                 return;
                             }
-                            dh.ExecuteSql("insert into returnsnbd (rsb_id,rsb_newsn,rsb_oldsn) values (returnsnbd_seq.nextval,'"+ sncode.Text + "','"+ show_sncode.Text + "') ", "insert");
+                            dh.ExecuteSql("insert into returnsnbd (rsb_id,rsb_newsn,rsb_oldsn,RSB_MAKECODE,RSB_PRODCODE,RSB_ORISPECCODE) values (returnsnbd_seq.nextval,'" + sncode.Text + "','"+ show_sncode.Text + "','"+makecode+"','"+prodcode+"','"+orispeccode+"') ", "insert");
                             bsncode = "";
                             ChangeResult.Enabled = true;
-                            OperateResult.AppendText(">>返修SN:" + show_sncode.Text + "与新SN:"+ sncode.Text + "关联成功\n", Color.Green, sncode, show_sncode);
+                            OperateResult.AppendText(">>返修SN:" + show_sncode.Text + "与新SN:"+ sncode.Text + "关联成功\n", Color.LawnGreen, sncode, show_sncode);
                             return;
                         }
                         else
@@ -121,7 +143,7 @@ namespace UAS_MES_NEW.Special
                             dh.ExecuteSql(" update returnsnbd set rsb_newsn = '"+ sncode.Text + "' where rsb_newsn = '"+show_sncode.Text+"'  ", "update");
                             bsncode = "";
                             ChangeResult.Enabled = true;
-                            OperateResult.AppendText(">>待转换新SN:" + show_sncode.Text + "更换至新SN:" + sncode.Text + "成功\n", Color.Green, sncode, show_sncode);
+                            OperateResult.AppendText(">>待转换新SN:" + show_sncode.Text + "更换至新SN:" + sncode.Text + "成功\n", Color.LawnGreen, sncode, show_sncode);
                             return;
                         }
                     }

+ 2 - 2
UAS_MES_ZT/FunctionCode/Warehouse/Warehouse_FinishedProductOut.Designer.cs

@@ -106,13 +106,11 @@
             // palletBtn
             // 
             this.palletBtn.AutoSize = true;
-            this.palletBtn.Checked = true;
             this.palletBtn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.palletBtn.Location = new System.Drawing.Point(21, 640);
             this.palletBtn.Name = "palletBtn";
             this.palletBtn.Size = new System.Drawing.Size(111, 35);
             this.palletBtn.TabIndex = 219;
-            this.palletBtn.TabStop = true;
             this.palletBtn.Text = "栈板号";
             this.palletBtn.UseVisualStyleBackColor = true;
             this.palletBtn.Click += new System.EventHandler(this.serBtn_Click);
@@ -132,11 +130,13 @@
             // bigboxBtn
             // 
             this.bigboxBtn.AutoSize = true;
+            this.bigboxBtn.Checked = true;
             this.bigboxBtn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bigboxBtn.Location = new System.Drawing.Point(146, 640);
             this.bigboxBtn.Name = "bigboxBtn";
             this.bigboxBtn.Size = new System.Drawing.Size(87, 35);
             this.bigboxBtn.TabIndex = 221;
+            this.bigboxBtn.TabStop = true;
             this.bigboxBtn.Text = "箱号";
             this.bigboxBtn.UseVisualStyleBackColor = true;
             this.bigboxBtn.Click += new System.EventHandler(this.serBtn_Click);

+ 18 - 0
UAS_MES_ZT/FunctionCode/Warehouse/Warehouse_FinishedProductOut.resx

@@ -177,6 +177,24 @@
   <metadata name="blank.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pim_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pim_mac.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pim_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_detail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_spec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="blank.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <data name="ConfirmOut.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m

+ 21 - 18
UAS_MES_ZT/FunctionCode/Warehouse/Warehouse_ProdDetail.Designer.cs

@@ -31,7 +31,7 @@
             this.headBar1 = new UAS_MES_NEW.CustomControl.HeadBar();
             this.InOutDetailDGV = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
             this.pd_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_ordercode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_orispeccode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pr_detail = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.outqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.getqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -42,10 +42,12 @@
             // headBar1
             // 
             this.headBar1.BackColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.headBar1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.headBar1.Dock = System.Windows.Forms.DockStyle.Top;
             this.headBar1.Location = new System.Drawing.Point(0, 0);
+            this.headBar1.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.headBar1.Name = "headBar1";
-            this.headBar1.Size = new System.Drawing.Size(621, 32);
+            this.headBar1.Size = new System.Drawing.Size(932, 47);
             this.headBar1.TabIndex = 0;
             this.headBar1.Title = null;
             this.headBar1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.headBar1_MouseDown);
@@ -56,34 +58,35 @@
             this.InOutDetailDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.InOutDetailDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.pd_prodcode,
-            this.pd_ordercode,
+            this.pr_orispeccode,
             this.pr_detail,
             this.outqty,
             this.getqty,
             this.ungetqty});
             this.InOutDetailDGV.EnableContentClick = true;
-            this.InOutDetailDGV.Location = new System.Drawing.Point(32, 37);
-            this.InOutDetailDGV.Margin = new System.Windows.Forms.Padding(2);
+            this.InOutDetailDGV.Location = new System.Drawing.Point(48, 56);
             this.InOutDetailDGV.Name = "InOutDetailDGV";
             this.InOutDetailDGV.RowTemplate.Height = 27;
-            this.InOutDetailDGV.Size = new System.Drawing.Size(544, 357);
+            this.InOutDetailDGV.Size = new System.Drawing.Size(816, 536);
             this.InOutDetailDGV.TabIndex = 219;
             // 
             // pd_prodcode
             // 
             this.pd_prodcode.DataPropertyName = "pd_prodcode";
             this.pd_prodcode.HeaderText = "产品代码";
-            this.pd_prodcode.MinimumWidth = 120;
+            this.pd_prodcode.MinimumWidth = 80;
             this.pd_prodcode.Name = "pd_prodcode";
             this.pd_prodcode.ReadOnly = true;
-            this.pd_prodcode.Width = 120;
+            this.pd_prodcode.Width = 80;
             // 
-            // pd_ordercode
+            // pr_orispeccode
             // 
-            this.pd_ordercode.DataPropertyName = "pd_ordercode";
-            this.pd_ordercode.HeaderText = "订单编号";
-            this.pd_ordercode.Name = "pd_ordercode";
-            this.pd_ordercode.ReadOnly = true;
+            this.pr_orispeccode.DataPropertyName = "pr_orispeccode";
+            this.pr_orispeccode.HeaderText = "型号";
+            this.pr_orispeccode.MinimumWidth = 120;
+            this.pr_orispeccode.Name = "pr_orispeccode";
+            this.pr_orispeccode.ReadOnly = true;
+            this.pr_orispeccode.Width = 120;
             // 
             // pr_detail
             // 
@@ -114,18 +117,18 @@
             // 
             // Warehouse_ProdDetail
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(621, 420);
+            this.ClientSize = new System.Drawing.Size(932, 630);
             this.Controls.Add(this.InOutDetailDGV);
             this.Controls.Add(this.headBar1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(2);
+            this.Margin = new System.Windows.Forms.Padding(3, 3, 3, 3);
             this.Name = "Warehouse_ProdDetail";
             this.Text = "Warehouse_ProdDetail";
             this.Load += new System.EventHandler(this.Warehouse_ProdDetail_Load);
             ((System.ComponentModel.ISupportInitialize)(this.InOutDetailDGV)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
 
         }
 
@@ -134,7 +137,7 @@
         private CustomControl.HeadBar headBar1;
         private CustomControl.DataGrid_View.DataGridViewWithSerialNum InOutDetailDGV;
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_prodcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pd_ordercode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_orispeccode;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail;
         private System.Windows.Forms.DataGridViewTextBoxColumn outqty;
         private System.Windows.Forms.DataGridViewTextBoxColumn getqty;

+ 3 - 3
UAS_MES_ZT/FunctionCode/Warehouse/Warehouse_ProdDetail.cs

@@ -45,9 +45,9 @@ namespace UAS_MES_NEW.Warehouse
         private void Warehouse_ProdDetail_Load(object sender, EventArgs e)
         {
             sql.Clear();
-            sql.Append("select pd_ordercode,pd_prodcode,pr_detail,outqty ,nvl((select count(1) from prodiomac where pim_inoutno='" + pim_inoutno+"' and pim_prodcode=pd_prodcode),0) getqty ");
-            sql.Append("from (select pd_ordercode,pd_prodcode,sum(pd_outqty) outqty from prodiodetail ");
-            sql.Append("where pd_piid='"+pd_piid+ "'group by pd_prodcode,pd_ordercode) left join product on pr_code=pd_prodcode");
+            sql.Append("select pr_orispeccode,pd_prodcode,pr_detail,outqty ,nvl((select count(1) from prodiomac where pim_inoutno='" + pim_inoutno+"' and pim_prodcode=pd_prodcode),0) getqty ");
+            sql.Append("from (select pd_prodcode,sum(pd_outqty) outqty from prodiodetail ");
+            sql.Append("where pd_piid='"+pd_piid+ "'group by pd_prodcode) left join product on pr_code=pd_prodcode");
             dbfind = (DataTable)dh.ExecuteSql(sql.GetString(),"select");
             BaseUtil.FillDgvWithDataTable(InOutDetailDGV, dbfind);
             for (int i = 0; i < InOutDetailDGV.Rows.Count; i++)

+ 1 - 1
UAS_MES_ZT/FunctionCode/Warehouse/Warehouse_ProdDetail.resx

@@ -117,7 +117,7 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <metadata name="pd_ordercode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="pr_orispeccode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
 </root>

+ 38 - 36
UAS_MES_ZT/FunctionCode/Warehouse/Warehouse_ProductMakeIn.Designer.cs

@@ -57,21 +57,23 @@
             // 
             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(12, 11);
+            this.label8.Location = new System.Drawing.Point(18, 16);
+            this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(74, 21);
+            this.label8.Size = new System.Drawing.Size(110, 31);
             this.label8.TabIndex = 227;
             this.label8.Text = "当前明细";
             // 
             // bigboxBtn
             // 
             this.bigboxBtn.AutoSize = true;
+            this.bigboxBtn.Checked = true;
             this.bigboxBtn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bigboxBtn.Location = new System.Drawing.Point(111, 397);
-            this.bigboxBtn.Margin = new System.Windows.Forms.Padding(2);
+            this.bigboxBtn.Location = new System.Drawing.Point(166, 596);
             this.bigboxBtn.Name = "bigboxBtn";
-            this.bigboxBtn.Size = new System.Drawing.Size(60, 25);
+            this.bigboxBtn.Size = new System.Drawing.Size(87, 35);
             this.bigboxBtn.TabIndex = 231;
+            this.bigboxBtn.TabStop = true;
             this.bigboxBtn.Text = "箱号";
             this.bigboxBtn.UseVisualStyleBackColor = true;
             this.bigboxBtn.Click += new System.EventHandler(this.serBtn_Click);
@@ -80,10 +82,9 @@
             // 
             this.serBtn.AutoSize = true;
             this.serBtn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.serBtn.Location = new System.Drawing.Point(197, 397);
-            this.serBtn.Margin = new System.Windows.Forms.Padding(2);
+            this.serBtn.Location = new System.Drawing.Point(296, 596);
             this.serBtn.Name = "serBtn";
-            this.serBtn.Size = new System.Drawing.Size(108, 25);
+            this.serBtn.Size = new System.Drawing.Size(159, 35);
             this.serBtn.TabIndex = 230;
             this.serBtn.Text = "单台序列号";
             this.serBtn.UseVisualStyleBackColor = true;
@@ -92,14 +93,11 @@
             // palletBtn
             // 
             this.palletBtn.AutoSize = true;
-            this.palletBtn.Checked = true;
             this.palletBtn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.palletBtn.Location = new System.Drawing.Point(28, 397);
-            this.palletBtn.Margin = new System.Windows.Forms.Padding(2);
+            this.palletBtn.Location = new System.Drawing.Point(42, 596);
             this.palletBtn.Name = "palletBtn";
-            this.palletBtn.Size = new System.Drawing.Size(76, 25);
+            this.palletBtn.Size = new System.Drawing.Size(111, 35);
             this.palletBtn.TabIndex = 229;
-            this.palletBtn.TabStop = true;
             this.palletBtn.Text = "栈板号";
             this.palletBtn.UseVisualStyleBackColor = true;
             this.palletBtn.Click += new System.EventHandler(this.serBtn_Click);
@@ -108,17 +106,19 @@
             // 
             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(12, 447);
+            this.label1.Location = new System.Drawing.Point(18, 670);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(58, 21);
+            this.label1.Size = new System.Drawing.Size(86, 31);
             this.label1.TabIndex = 234;
             this.label1.Text = "采集框";
             // 
             // Search
             // 
-            this.Search.Location = new System.Drawing.Point(197, 45);
+            this.Search.Location = new System.Drawing.Point(296, 68);
+            this.Search.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Search.Name = "Search";
-            this.Search.Size = new System.Drawing.Size(68, 21);
+            this.Search.Size = new System.Drawing.Size(102, 32);
             this.Search.TabIndex = 237;
             this.Search.Text = "查询";
             this.Search.UseVisualStyleBackColor = true;
@@ -127,31 +127,33 @@
             // pallecode
             // 
             this.pallecode.BackColor = System.Drawing.Color.Transparent;
-            this.pallecode.Location = new System.Drawing.Point(12, 45);
+            this.pallecode.Location = new System.Drawing.Point(18, 68);
+            this.pallecode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pallecode.Name = "pallecode";
             this.pallecode.PlaceHolder = "栈板/箱搜索";
-            this.pallecode.Size = new System.Drawing.Size(159, 28);
+            this.pallecode.Size = new System.Drawing.Size(238, 42);
             this.pallecode.TabIndex = 236;
             this.pallecode.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder.OnTextChange(this.textBoxWithPlaceHolder1_UserControlTextChanged);
             // 
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(333, 378);
+            this.OperateResult.Location = new System.Drawing.Point(500, 567);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(343, 94);
+            this.OperateResult.Size = new System.Drawing.Size(512, 139);
             this.OperateResult.TabIndex = 235;
             this.OperateResult.Text = "";
             // 
             // cancel
             // 
+            this.cancel.AllPower = null;
             this.cancel.AutoSize = true;
             this.cancel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.cancel.Location = new System.Drawing.Point(234, 447);
-            this.cancel.Margin = new System.Windows.Forms.Padding(2);
+            this.cancel.Location = new System.Drawing.Point(351, 670);
             this.cancel.Name = "cancel";
             this.cancel.Power = null;
-            this.cancel.Size = new System.Drawing.Size(61, 25);
+            this.cancel.Size = new System.Drawing.Size(88, 35);
             this.cancel.TabIndex = 233;
             this.cancel.Text = "取消";
             this.cancel.UseVisualStyleBackColor = true;
@@ -161,11 +163,10 @@
             this.input.AllPower = null;
             this.input.BackColor = System.Drawing.Color.White;
             this.input.ID = null;
-            this.input.Location = new System.Drawing.Point(87, 447);
-            this.input.Margin = new System.Windows.Forms.Padding(2);
+            this.input.Location = new System.Drawing.Point(130, 670);
             this.input.Name = "input";
             this.input.Power = null;
-            this.input.Size = new System.Drawing.Size(125, 21);
+            this.input.Size = new System.Drawing.Size(186, 28);
             this.input.Str = null;
             this.input.Str1 = null;
             this.input.Str2 = null;
@@ -177,10 +178,11 @@
             this.getqty.AutoSize = true;
             this.getqty.CutLength = null;
             this.getqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.getqty.Location = new System.Drawing.Point(101, 12);
-            this.getqty.MaximumSize = new System.Drawing.Size(200, 0);
+            this.getqty.Location = new System.Drawing.Point(152, 18);
+            this.getqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.getqty.MaximumSize = new System.Drawing.Size(300, 0);
             this.getqty.Name = "getqty";
-            this.getqty.Size = new System.Drawing.Size(0, 21);
+            this.getqty.Size = new System.Drawing.Size(0, 31);
             this.getqty.TabIndex = 228;
             // 
             // InOutDetailDGV
@@ -196,11 +198,10 @@
             this.pr_spec,
             this.Sp});
             this.InOutDetailDGV.EnableContentClick = true;
-            this.InOutDetailDGV.Location = new System.Drawing.Point(11, 78);
-            this.InOutDetailDGV.Margin = new System.Windows.Forms.Padding(2);
+            this.InOutDetailDGV.Location = new System.Drawing.Point(16, 117);
             this.InOutDetailDGV.Name = "InOutDetailDGV";
             this.InOutDetailDGV.RowTemplate.Height = 27;
-            this.InOutDetailDGV.Size = new System.Drawing.Size(665, 293);
+            this.InOutDetailDGV.Size = new System.Drawing.Size(998, 440);
             this.InOutDetailDGV.TabIndex = 219;
             this.InOutDetailDGV.DataSourceChanged += new System.EventHandler(this.InOutDetailDGV_DataSourceChanged);
             // 
@@ -262,9 +263,9 @@
             // 
             // Warehouse_ProductMakeIn
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(700, 499);
+            this.ClientSize = new System.Drawing.Size(1050, 748);
             this.Controls.Add(this.Search);
             this.Controls.Add(this.pallecode);
             this.Controls.Add(this.OperateResult);
@@ -278,6 +279,7 @@
             this.Controls.Add(this.label8);
             this.Controls.Add(this.InOutDetailDGV);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "Warehouse_ProductMakeIn";
             this.Tag = "Warehouse!ProductMakeIn";
             this.Text = "完工入库";
@@ -285,7 +287,7 @@
             this.SizeChanged += new System.EventHandler(this.Warehouse_ProductMakeIn_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.InOutDetailDGV)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }

+ 2 - 2
UAS_MES_ZT/Login.cs

@@ -94,8 +94,8 @@ namespace UAS_MES_NEW
             //设置选中数据库的链接
             string DBUser = DB.SelectedValue.ToString().Split('#')[0];
             string Address = DB.SelectedValue.ToString().Split('#')[1];
-            //DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST="+ Address + ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
-            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=usoft.f3322.net)(PORT=11659)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST="+ Address + ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            //DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=usoft.f3322.net)(PORT=11659)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             SystemInf.CurrentDB = DBUser;   
             //设置屏幕的宽高信息
             SystemInf.ScreenWidth = Screen.PrimaryScreen.WorkingArea.Width;

+ 1 - 1
UAS_MES_ZT/Properties/Settings.settings

@@ -27,7 +27,7 @@
       <Value Profile="(Default)">ftp://10.8.0.82|vsftpd|vsftpd</Value>
     </Setting>
     <Setting Name="MES" Type="System.String" Scope="Application">
-      <Value Profile="(Default)">Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES_ZTRH;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=usoft.f3322.net)(PORT=11659)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
+      <Value Profile="(Default)">Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES_ZTRH;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.66.6)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
     </Setting>
   </Settings>
 </SettingsFile>

+ 2 - 3
UAS_MES_ZT/Properties/Settings1.Designer.cs

@@ -122,9 +122,8 @@ namespace UAS_MES_NEW.Properties {
         [global::System.Configuration.ApplicationScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
         [global::System.Configuration.DefaultSettingValueAttribute("Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES_ZTRH;Poolin" +
-            "g=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=usof" +
-            "t.f3322.net)(PORT=11659)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));" +
-            "")]
+            "g=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192." +
+            "168.66.6)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
         public string MES {
             get {
                 return ((string)(this["MES"]));

+ 1 - 0
UAS_MES_ZT/PublicMethod/LogicHandler.cs

@@ -815,6 +815,7 @@ namespace UAS_MES_NEW.PublicMethod
             string dutyemcode = dh.getFieldDataByCondition("steppassed", "sp_inman", "sp_sncode  = '" + iSnCode + "' and  sp_stepcode = '" + dutystepcode + "' and sp_makecode = '" + iMakeCode + "' order by sp_id desc").ToString();
             if (dutyemcode == "")
             {
+                dutystepcode = StepCode;
                 dutyemcode = iUserCode;
             }
             sql.Clear();

BIN
UAS_MES_ZT/Resources/Sound/上料成功.wav


BIN
UAS_MES_ZT/Resources/Sound/已封箱.wav


BIN
UAS_MES_ZT/Resources/Sound/强制批过.wav


BIN
UAS_MES_ZT/Resources/Sound/强制批退.wav


BIN
UAS_MES_ZT/Resources/Sound/打印.wav


BIN
UAS_MES_ZT/Resources/Sound/批过.wav


BIN
UAS_MES_ZT/Resources/Sound/批退.wav


BIN
UAS_MES_ZT/Resources/Sound/老化开始.wav


BIN
UAS_MES_ZT/Resources/Sound/老化结束.wav


BIN
UAS_MES_ZT/Resources/Sound/转码成功.wav


BIN
UAS_MES_ZT/Resources/Sound/重新转码成功.wav


+ 20 - 0
UAS_MES_ZT/UAS_MES_ZT.csproj

@@ -966,6 +966,12 @@
     <Compile Include="FunctionCode\Packing\Packing_ProdWeightSet.Designer.cs">
       <DependentUpon>Packing_ProdWeightSet.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Query\BadSn.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Query\BadSn.Designer.cs">
+      <DependentUpon>BadSn.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Query\BadItem.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1651,6 +1657,9 @@
     <EmbeddedResource Include="FunctionCode\Packing\Packing_ProdWeightSet.resx">
       <DependentUpon>Packing_ProdWeightSet.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Query\BadSn.resx">
+      <DependentUpon>BadSn.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Query\BadItem.resx">
       <DependentUpon>BadItem.cs</DependentUpon>
     </EmbeddedResource>
@@ -1875,6 +1884,17 @@
     <None Include="Resources\Sound\4082.wav" />
     <Content Include="Resources\Sound\FAIL.wav" />
     <Content Include="Resources\Sound\PASS.wav" />
+    <Content Include="Resources\Sound\上料成功.wav" />
+    <Content Include="Resources\Sound\已封箱.wav" />
+    <Content Include="Resources\Sound\强制批过.wav" />
+    <Content Include="Resources\Sound\强制批退.wav" />
+    <Content Include="Resources\Sound\打印.wav" />
+    <Content Include="Resources\Sound\批过.wav" />
+    <Content Include="Resources\Sound\批退.wav" />
+    <Content Include="Resources\Sound\老化开始.wav" />
+    <Content Include="Resources\Sound\老化结束.wav" />
+    <Content Include="Resources\Sound\转码成功.wav" />
+    <Content Include="Resources\Sound\重新转码成功.wav" />
     <Content Include="Tool\DevComponents.DotNetBar2.dll" />
     <Content Include="Tool\DevExpress.BonusSkins.v15.2.dll" />
     <Content Include="Tool\DevExpress.Data.v15.2.dll" />