ソースを参照

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

章政 8 年 前
コミット
bf59a5e3df

+ 0 - 1
UAS-MES/FunctionCode/Make/Make_PositionStock.Designer.cs

@@ -394,7 +394,6 @@
             this.mss_id.DataPropertyName = "mss_id";
             this.mss_id.HeaderText = "ID";
             this.mss_id.Name = "mss_id";
-            this.mss_id.Visible = false;
             // 
             // mss_prodcode
             // 

+ 45 - 23
UAS-MES/FunctionCode/Make/Make_PositionStock.cs

@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Generic;
 using System.Data;
 using System.Drawing;
 using System.Text;
@@ -159,7 +160,7 @@ namespace UAS_MES.Make
             if (!show_all_check.Checked)
             {
                 sql.Clear();
-                sql.Append("select mss_makecode,nvl(mss_id,0) mss_id,sp_soncode,mss_prodcode,sp_oneuseqty,mss_barcode,nvl(mss_qty,0) mss_qty ,nvl(mss_remain,0)mss_remain,");
+                sql.Append("select nvl(mss_makecode,' ') mss_makecode,nvl(mss_id,0) mss_id,sp_soncode,mss_prodcode,sp_oneuseqty,mss_barcode,nvl(mss_qty,0) mss_qty ,nvl(mss_remain,0)mss_remain,");
                 sql.Append("pr_detail,nvl(mss_useqty,0) mss_useqty from stepbom left join stepproduct on sp_sbid=sb_id left join product on ");
                 sql.Append("pr_code=sp_mothercode left join makesourcestock on mss_makecode='" + ma_code.Text + "' and  mss_craftcode=sb_craftcode ");
                 sql.Append("and mss_stepcode=sp_stepcode and sp_soncode=mss_prodcode where sb_prodcode='" + ma_prodcode.Text + "' and sb_craftcode='" + ma_craftcode.Text + "' ");
@@ -171,7 +172,7 @@ namespace UAS_MES.Make
             else
             {
                 sql.Clear();
-                sql.Append("select mss_makecode,nvl(mss_id,0) mss_id,sp_soncode,mss_prodcode,sp_oneuseqty,mss_barcode,nvl(mss_qty,0) mss_qty ,nvl(mss_remain,0)mss_remain,");
+                sql.Append("select nvl(mss_makecode,' ') mss_makecode,nvl(mss_id,0) mss_id,sp_soncode,mss_prodcode,sp_oneuseqty,mss_barcode,nvl(mss_qty,0) mss_qty ,nvl(mss_remain,0)mss_remain,");
                 sql.Append("pr_detail,nvl(mss_useqty,0) mss_useqty from stepbom left join stepproduct on sp_sbid=sb_id left join product on ");
                 sql.Append("pr_code=sp_mothercode left join makesourcestock on  mss_craftcode=sb_craftcode ");
                 sql.Append("and mss_stepcode=sp_stepcode and sp_soncode=mss_prodcode where  ");
@@ -218,15 +219,10 @@ namespace UAS_MES.Make
                     string soncode = BatchProductDGV.Rows[e.RowIndex].Cells["sp_soncode"].Value.ToString();
                     if (id != "0")
                     {
-                        //if (useqty == "0")
-                        //{
-                            //BatchProductDGV.Rows.RemoveAt(e.RowIndex);
                             dh.ExecuteSql("delete from makesourcestock where mss_id='" + id + "'", "delete");
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "岗位备料", "删除物料" + soncode, "", "");
                             OperateResult.AppendText(">>料号" + soncode + "删除成功\n");
                             FillDataGridView();
-                        //}
-                        //else OperateResult.AppendText(">>料号" + soncode + "已被使用,不允许删除\n", Color.Red);
                     }
                 }
             }
@@ -345,28 +341,54 @@ namespace UAS_MES.Make
 
         private void normalButton1_Click(object sender, EventArgs e)
         {
-            String dialog = MessageBox.Show("是否确认全部下料", "提示", MessageBoxButtons.OKCancel).ToString();
-            if (dialog != "OK")
+            bool makesources = false;
+            for (int i = 0; i < BatchProductDGV.Rows.Count; i++)
             {
-                OperateResult.AppendText("取消全部下料\n", Color.Black);
-                return;
+                string id_1 = BatchProductDGV.Rows[i].Cells["mss_id"].Value.ToString();
+                if (id_1 != "0")
+                {
+                    makesources = true;
+                }
             }
-            else
+            if (makesources)
             {
-                for (int i = 0; i < BatchProductDGV.Rows.Count; i++)
+                String dialog = MessageBox.Show("是否确认全部下料", "提示", MessageBoxButtons.OKCancel).ToString();
+                if (dialog != "OK")
                 {
-                    string id = BatchProductDGV.Rows[i].Cells["mss_id"].Value.ToString();
-                    string useqty = BatchProductDGV.Rows[i].Cells["mss_useqty"].Value.ToString();
-                    string soncode = BatchProductDGV.Rows[i].Cells["sp_soncode"].Value.ToString();
-                    if (id != "0")
+                    OperateResult.AppendText("取消全部下料\n", Color.Black);
+                    return;
+                }
+                else
+                {
+                    List<string> idcol = new List<string>();
+                    List<string> makecodecol = new List<string>();
+                    List<string> soncodecol = new List<string>();
+                    for (int i = 0; i < BatchProductDGV.Rows.Count; i++)
                     {
-                      //BatchProductDGV.Rows.RemoveAt(i);
-                        dh.ExecuteSql("delete from makesourcestock where mss_id='" + id + "'", "delete");
-                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "岗位备料", "删除物料" + soncode, "", "");
-                        OperateResult.AppendText(">>料号" + soncode + "删除成功\n");
-                        FillDataGridView();
+                       
+                        string id = BatchProductDGV.Rows[i].Cells["mss_id"].Value.ToString();
+                        string useqty = BatchProductDGV.Rows[i].Cells["mss_useqty"].Value.ToString();
+                        string soncode = BatchProductDGV.Rows[i].Cells["sp_soncode"].Value.ToString();
+                        string makecode = BatchProductDGV.Rows[i].Cells["mss_makecode"].Value.ToString();
+                        if (id != "0")
+                        {
+                            idcol.Add(id);
+                            makecodecol.Add(makecode);
+                            soncodecol.Add("删除物料"+soncode);
+                            OperateResult.AppendText(">>料号" + soncode + "删除成功\n");   
+                        }
                     }
-                } 
+                    sql.Clear();
+                    sql.Append("insert into commandlog(cl_id,cl_caller,cl_man,cl_date,cl_linecode,cl_sourcecode,cl_makecode,cl_operate,");
+                    sql.Append("cl_result,cl_sncode,cl_code) values( commandlog_seq.nextval,'" + Tag.ToString() + "','" + User.UserCode + "',sysdate,'" + User.UserLineCode + "' ,");
+                    sql.Append("'" + User.UserSourceCode + " ' ,:iMakeCode,'岗位备料',:iResult,' ',' ')");
+                    dh.BatchInsert(sql.GetString(), new String[] { "iMakeCode", "iResult" }, makecodecol.ToArray(), soncodecol.ToArray());
+                    dh.BatchInsert("delete from makesourcestock where mss_id=:id", new String[] { "id" }, idcol.ToArray());
+                    FillDataGridView();
+                }
+            }
+            else {
+                OperateResult.AppendText(">>没有上料记录,无需全部下料\n",Color.Red);
             }
         }
     }

+ 66 - 36
UAS-MES/FunctionCode/Query/Query_ExeProgress.cs

@@ -19,6 +19,8 @@ namespace UAS_MES.Query
         LogStringBuilder sql = new LogStringBuilder();
         //经过的步骤
         string PastStep = "";
+        //经过的步骤
+        string nextStepCode = "";
         //拆分后的经过的步骤
         Dictionary<int, string> Step;
         List<Brush> PaintColor = new List<Brush>();
@@ -42,6 +44,7 @@ namespace UAS_MES.Query
             ScreenWidth = this.Width;
             ScreenHeight = this.Height;
             asc.controllInitializeSize(this);
+            sn_code.Focus();
         }
 
         private void 工单执行进度_SizeChanged(object sender, EventArgs e)
@@ -54,7 +57,7 @@ namespace UAS_MES.Query
             if (e.KeyCode == Keys.Enter)
             {
                 string ms_id = dh.getFieldDataByCondition("makeserial", "max(ms_id) ms_id", "ms_sncode='" + sn_code.Text + "'").ToString();
-                dt = (DataTable)dh.ExecuteSql("select ms_status,ms_paststep,ms_stepcode,NVL(ms_ifrework, 0) ms_ifrework,NVL(ms_reworkstatus, 0) ms_reworkstatus from makeserial where ms_id='" + ms_id + "'", "select");
+                dt = (DataTable)dh.ExecuteSql("select ms_status,ms_nextstepcode,ms_paststep,ms_stepcode,NVL(ms_ifrework, 0) ms_ifrework,NVL(ms_reworkstatus, 0) ms_reworkstatus from makeserial where ms_id='" + ms_id + "'", "select");
                 if (dt.Rows.Count > 0)
                 {
                     if (Step != null && Step.Count > 0)
@@ -66,12 +69,14 @@ namespace UAS_MES.Query
                     string ifRework = dt.Rows[0]["ms_ifrework"].ToString();
                     //执行过的步骤
                     PastStep = dt.Rows[0]["ms_paststep"].ToString();
+                    //下一步骤
+                    nextStepCode = dt.Rows[0]["ms_nextstepcode"].ToString();
                     //如果为不良的时候
                     string BadStep = "";
                     string RejectStep = "";
                     string currentStep = "";
                     //先判断是否是返工的
-                    if (ifRework!= "0")
+                    if (ifRework != "0")
                     {
                         //是返工的
                         if (dt.Rows[0]["ms_reworkstatus"].ToString() == "3")
@@ -95,7 +100,16 @@ namespace UAS_MES.Query
                             RejectStep = dt.Rows[0]["ms_stepcode"].ToString();
                         }
                     }
-                    currentStep= dt.Rows[0]["ms_stepcode"].ToString();
+                    currentStep = dt.Rows[0]["ms_stepcode"].ToString();
+                    //添加开始节点绿色,除了返工单
+                    if (BadStep==""&& ((dt.Rows[0]["ms_status"].ToString() == "3"&&ifRework=="0")||(dt.Rows[0]["ms_reworkstatus"].ToString()=="3"&&ifRework=="-1")))
+                    {
+                        PaintColor.Add(Brushes.Red);
+                    }
+                    else
+                    {
+                        PaintColor.Add(Brushes.Green);
+                    }
                     //查询执行过的步骤
                     sql.Clear();
                     sql.Append("select CD_DETNO,CD_STEPCODE,ms_makecode from craft left join craftdetail on cd_crid = cr_id  left join makeserial ");
@@ -111,58 +125,74 @@ namespace UAS_MES.Query
                         else
                             Step.Add(i, dt.Rows[i - 1]["CD_STEPCODE"].ToString());
                     }
-                    //添加开始节点绿色
-                    PaintColor.Add(Brushes.Green);
                     //添加中间节点
                     bool passed = true;
+                    int index = 0;
                     for (int i = 0; i < dt.Rows.Count; i++)
                     {
-                        //还未开始返工
-                        if (currentStep == "")
+                        if (nextStepCode == dt.Rows[i]["CD_STEPCODE"].ToString())
                         {
-                            passed = false;
+                            index = i;
                         }
-                        //passed==true;说明经过了这一步
-                        if (passed)
+                    }
+                    for (int i = 0; i < dt.Rows.Count; i++)
+                    {
+                        ////下一步不在途程中,不良或者报废或者完工
+                        if (nextStepCode == ""||nextStepCode==" ")
                         {
+                            //返工单
+                            if (currentStep=="")
+                            {
+                                passed = false;
+                            }
+                            //找到不良步骤
                             if (BadStep == dt.Rows[i]["CD_STEPCODE"].ToString())
                             {
                                 PaintColor.Add(Brushes.Red);
                                 //是不良品,后面就不执行
                                 passed = false;
                             }
+                            //找到报废步骤
+                            else if (PastStep.Contains(dt.Rows[i]["CD_STEPCODE"].ToString() + "," + RejectStep)&&RejectStep!="")
+                            {
+                                PaintColor.Add(Brushes.Black);
+                                //是报废品,后面就不执行
+                                passed = false;
+                            }
                             else
                             {
-                                if (!PastStep.Contains(dt.Rows[i]["CD_STEPCODE"].ToString() + "," + RejectStep) || RejectStep == "")
+                                //通过加绿色
+                                if (passed)
+                                {
                                     PaintColor.Add(Brushes.Green);
+                                }
+                                //不通过加白色
                                 else
                                 {
-                                    //判断之前有没有添加过黑色
-                                    if (PaintColor.Contains(Brushes.Black))
-                                    {
-                                        //移除之前的,
-                                        int index = PaintColor.IndexOf(Brushes.Black);
-                                        PaintColor.RemoveAt(PaintColor.IndexOf(Brushes.Black));
-                                        PaintColor.Insert(index, Brushes.Green);
-                                    }
-                                    PaintColor.Add(Brushes.Black);
-                                    //是报废品,后面也不执行
-                                    passed = false;
+                                    PaintColor.Add(Brushes.White);
                                 }
                             }
                         }
-                        //还没经过
+                        ////序列号下一步不为空
                         else
                         {
-                            PaintColor.Add(Brushes.White);
-                        }
-                        //如果返工执行到了当前步
-                        if (currentStep==dt.Rows[i]["CD_STEPCODE"].ToString()) {
-                            passed = false;
+                            /////SN下一步是否在途程中,是则标记
+                            //找到下一步
+                            if (i < index)
+                            {
+                                //已执行
+                                PaintColor.Add(Brushes.Green);
+                            }
+                            else
+                            {
+                                //未执行
+                                PaintColor.Add(Brushes.White);
+                            }
                         }
                     }
-                    if (ifRework != "0") {
-                        //完工添加绿色,未完工添加红色
+                    if (ifRework != "0")
+                    {
+                        //完工添加绿色,未完工添加白色
                         if (dh.CheckExist("Makeserial", "ms_id='" + ms_id + "' and ms_reworkstatus='2'"))
                             PaintColor.Add(Brushes.Green);
                         else
@@ -170,7 +200,7 @@ namespace UAS_MES.Query
                     }
                     else
                     {
-                        //完工添加绿色,未完工添加
+                        //完工添加绿色,未完工添加
                         if (dh.CheckExist("Makeserial", "ms_id='" + ms_id + "' and ms_status='2'"))
                             PaintColor.Add(Brushes.Green);
                         else
@@ -181,7 +211,7 @@ namespace UAS_MES.Query
                     sql.Clear();
                     sql.Append("select mp_makecode,ma_prodcode,sc_linecode,ma_craftcode,mp_sourcecode,mp_sncode,");
                     sql.Append("mp_indate,mp_inman,em_name from makeprocess left join make on mp_makecode=ma_code left join employee on mp_inman = em_code left join source on ");
-                    sql.Append("mp_sourcecode=sc_code where mp_sncode='" + sn_code.Text + "' and ma_code='"+dt.Rows[0]["ms_makecode"].ToString()+"'");
+                    sql.Append("mp_sourcecode=sc_code where mp_sncode='" + sn_code.Text + "' and ma_code='" + dt.Rows[0]["ms_makecode"].ToString() + "'");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     BaseUtil.FillDgvWithDataTable(CraftInfDgv, dt);
                 }
@@ -226,16 +256,16 @@ namespace UAS_MES.Query
                         Param.Text = j + " " + Step[j];
                         Param.Name = j + Step[j] + "_label";
                         Param.AutoSize = true;
-                        Param.Margin = new Padding(0,0,0,0);
+                        Param.Margin = new Padding(0, 0, 0, 0);
                         Param.Anchor = AnchorStyles.Left;
                         Param.Anchor = AnchorStyles.Top;
                         //获取param的宽度和高度
                         Graphics graphics = Graphics.FromHwnd(Param.Handle);
-                        SizeF size = graphics.MeasureString(Param.Text,Param.Font);
-                        
+                        SizeF size = graphics.MeasureString(Param.Text, Param.Font);
+
                         //设定param文本框的位置
                         //Param.Location = new Point(x + r.Width / 14 * RectangleCountEachRow, y + r.Height / 10 * 4);
-                        Param.Location = new Point(x+(int)(r.Width-size.Width)/2,y+(int)(r.Height-size.Height)/2);
+                        Param.Location = new Point(x + (int)(r.Width - size.Width) / 2, y + (int)(r.Height - size.Height) / 2);
                         graphics.Dispose();
                         //如果在奇数行
                         if (i % 2 != 0)

+ 16 - 10
UAS-MES/FunctionCode/Warehouse/Warehouse_FinishedProductOut.Designer.cs

@@ -243,6 +243,7 @@
             this.pi_id.Name = "pi_id";
             this.pi_id.Size = new System.Drawing.Size(0, 21);
             this.pi_id.TabIndex = 229;
+            this.pi_id.Visible = false;
             // 
             // pi_type
             // 
@@ -284,13 +285,13 @@
             this.Clean.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.Clean.Image = null;
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(478, 464);
+            this.Clean.Location = new System.Drawing.Point(479, 475);
             this.Clean.Margin = new System.Windows.Forms.Padding(2);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
             this.Clean.Power = null;
-            this.Clean.Size = new System.Drawing.Size(75, 31);
+            this.Clean.Size = new System.Drawing.Size(74, 20);
             this.Clean.TabIndex = 224;
             this.Clean.Text = "清除明细";
             this.Clean.UseVisualStyleBackColor = false;
@@ -334,13 +335,13 @@
             this.ConfirmOut.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.ConfirmOut.Image = null;
             this.ConfirmOut.IsShowBorder = true;
-            this.ConfirmOut.Location = new System.Drawing.Point(563, 17);
+            this.ConfirmOut.Location = new System.Drawing.Point(563, 20);
             this.ConfirmOut.Margin = new System.Windows.Forms.Padding(2);
             this.ConfirmOut.MoveImage = ((System.Drawing.Image)(resources.GetObject("ConfirmOut.MoveImage")));
             this.ConfirmOut.Name = "ConfirmOut";
             this.ConfirmOut.NormalImage = ((System.Drawing.Image)(resources.GetObject("ConfirmOut.NormalImage")));
             this.ConfirmOut.Power = null;
-            this.ConfirmOut.Size = new System.Drawing.Size(75, 30);
+            this.ConfirmOut.Size = new System.Drawing.Size(75, 27);
             this.ConfirmOut.TabIndex = 216;
             this.ConfirmOut.Text = "确认出货";
             this.ConfirmOut.UseVisualStyleBackColor = false;
@@ -354,13 +355,13 @@
             this.NewProdInOut.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.NewProdInOut.Image = null;
             this.NewProdInOut.IsShowBorder = true;
-            this.NewProdInOut.Location = new System.Drawing.Point(648, 16);
+            this.NewProdInOut.Location = new System.Drawing.Point(654, 21);
             this.NewProdInOut.Margin = new System.Windows.Forms.Padding(2);
             this.NewProdInOut.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewProdInOut.MoveImage")));
             this.NewProdInOut.Name = "NewProdInOut";
             this.NewProdInOut.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewProdInOut.NormalImage")));
             this.NewProdInOut.Power = null;
-            this.NewProdInOut.Size = new System.Drawing.Size(78, 31);
+            this.NewProdInOut.Size = new System.Drawing.Size(75, 26);
             this.NewProdInOut.TabIndex = 215;
             this.NewProdInOut.Text = "新增出货单";
             this.NewProdInOut.UseVisualStyleBackColor = false;
@@ -374,13 +375,13 @@
             this.ProdDetail.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.ProdDetail.Image = null;
             this.ProdDetail.IsShowBorder = true;
-            this.ProdDetail.Location = new System.Drawing.Point(478, 16);
+            this.ProdDetail.Location = new System.Drawing.Point(488, 20);
             this.ProdDetail.Margin = new System.Windows.Forms.Padding(2);
             this.ProdDetail.MoveImage = ((System.Drawing.Image)(resources.GetObject("ProdDetail.MoveImage")));
             this.ProdDetail.Name = "ProdDetail";
             this.ProdDetail.NormalImage = ((System.Drawing.Image)(resources.GetObject("ProdDetail.NormalImage")));
             this.ProdDetail.Power = null;
-            this.ProdDetail.Size = new System.Drawing.Size(75, 31);
+            this.ProdDetail.Size = new System.Drawing.Size(65, 27);
             this.ProdDetail.TabIndex = 214;
             this.ProdDetail.Text = "产品明细";
             this.ProdDetail.UseVisualStyleBackColor = false;
@@ -411,6 +412,7 @@
             this.pim_outboxcode.HeaderText = "栈板/箱号";
             this.pim_outboxcode.MinimumWidth = 120;
             this.pim_outboxcode.Name = "pim_outboxcode";
+            this.pim_outboxcode.ReadOnly = true;
             this.pim_outboxcode.Width = 120;
             // 
             // pim_mac
@@ -418,24 +420,28 @@
             this.pim_mac.DataPropertyName = "pim_mac";
             this.pim_mac.HeaderText = "SN号";
             this.pim_mac.Name = "pim_mac";
+            this.pim_mac.ReadOnly = true;
             // 
             // pim_prodcode
             // 
             this.pim_prodcode.DataPropertyName = "pim_prodcode";
             this.pim_prodcode.HeaderText = "产品代码";
             this.pim_prodcode.Name = "pim_prodcode";
+            this.pim_prodcode.ReadOnly = true;
             // 
             // pr_detail
             // 
             this.pr_detail.DataPropertyName = "pr_detail";
             this.pr_detail.HeaderText = "名称";
             this.pr_detail.Name = "pr_detail";
+            this.pr_detail.ReadOnly = true;
             // 
             // pr_spec
             // 
             this.pr_spec.DataPropertyName = "pr_spec";
             this.pr_spec.HeaderText = "规格";
             this.pr_spec.Name = "pr_spec";
+            this.pr_spec.ReadOnly = true;
             // 
             // Warehouse_FinishedProductOut
             // 
@@ -468,10 +474,10 @@
             this.Text = "成品出货";
             this.Load += new System.EventHandler(this.Warehouse_FinishedProductOut_Load);
             this.SizeChanged += new System.EventHandler(this.Warehouse_FinishedProductOut_SizeChanged);
-            this.panel1.ResumeLayout(false);
+            this.panel1.ResumeLayout(true);
             this.panel1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.InOutDetailDGV)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 2 - 1
UAS-MES/FunctionCode/Warehouse/Warehouse_FinishedProductOut.cs

@@ -168,7 +168,8 @@ namespace UAS_MES.Warehouse
                         dh.ExecuteSql("update package set pa_status=2 where exists (select 1 from prodiomac where pim_inoutno='" + pi_inoutno.Text + "' and pim_outboxcode=pa_outboxcode and ((pim_type='PALLET' AND PA_TYPE=3) OR (PIM_TYPE='BOX' AND PA_TYPE IN(1,2)))) AND PA_OUTNO='" + pi_inoutno.Text + "'", "update");
                         dh.ExecuteSql("update prodinout set pi_pdastatus='已出库' where pi_inoutno='" + pi_inoutno.Text + "'", "update");
                         dh.ExecuteSql("insert into messagelog(ml_id,ml_date,ml_man,ml_content,ml_result,ml_search)values(messagelog_seq.nextval,sysdate,'" + User.UserName + "','确认出货','确认出货成功','ProdInOut!Sale|pi_id=" + pi_id.Text + "')", "insert");
-                        OperateResult.AppendText("出货单" + pi_inoutno.Text + "出库成功\n", Color.Red,pi_inoutno);
+                        OperateResult.AppendText("出货单" + pi_inoutno.Text + "出库成功\n", Color.Black,pi_inoutno);
+                        BaseUtil.CleanDataGridView(InOutDetailDGV);
                     }
                 }
                 else