From ed504b73178fc5052cbffe1b360bd5d18b3b29b8 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期五, 07 七月 2023 11:28:35 +0800
Subject: [PATCH] 称重入库模块修改(增加作废、反作废功能;增加包号,选择不良原因;保存时根据是否自动打印进行是否跳出打印模版选择框控制)

---
 WarM/条码打印/Kf_WeighToBarCode.designer.cs |  126 +++++++++++++++--
 WarM/条码打印/Kf_WeighToBarCode.cs          |  244 +++++++++++++++++++++++++++++++++-
 WarM/条码打印/Kf_WeighToBarCode.resx        |   15 ++
 3 files changed, 358 insertions(+), 27 deletions(-)

diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs"
index ebd84cf..bbc60b7 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs"
@@ -60,6 +60,7 @@
             txtHBarCode.Text = "";
             grdMain.DataSource = null;
             grdSub.DataSource = null;
+            chkHDYFlag.Checked = true;
         }
 
         //绐椾綋鍔犺浇
@@ -461,15 +462,36 @@
             BarCode_Display();
             grdMain.Rows[0].Selected = true;
 
-            //鎵撳嵃鏉$爜
             sBarCodeItemID = DBUtility.ClsPub.isLong(grdMain.Rows[grdMain.SelectedRows[0].Index].Cells[Fun_GetCol("HItemID")].Value).ToString();
-            Sub_SetReport("鐗╂枡鏉$爜");
-            Report.Print(false);
-            Thread.Sleep(1000);
+            //鑷姩鎵撳嵃
+            if (chkHDYFlag.Checked == true)
+            {
+                //鎵撳嵃鏉$爜
+                Sub_SetReport("鐗╂枡鏉$爜");
+                Report.Print(false);
+                Thread.Sleep(1000);
+            }
+            else
+            {
+                //閫夋嫨鎵撳嵃妯℃澘
+                BLL.Gy_OpenTmp oFrm = new BLL.Gy_OpenTmp();
+                oFrm.sBillName = ModName;
+                oFrm.sBillModel = ModCaption;
+                oFrm.ShowDialog();
+                if (oFrm.OKTag == Pub_Class.ClsPub.Enum_OKTag.OKTag_OK)
+                {
+                    Sub_SetReport(oFrm.sOpenTmp);
+                    Report.Print(false);
+                    Thread.Sleep(1000);
+                }
+            }
 
             txtHQty.Text = "";
             txtHWeightQyt.Text = "";
             txtHKDQty.Text = "";
+            txtHBarcodeNo.Text = "";
+            txtHRemark.Text = "";
+            txtHRemark.Tag = 0;
             txtHQty.Focus();
         }
 
@@ -489,6 +511,11 @@
             else if (DBUtility.ClsPub.isDoule( txtHWeightQyt.Text) == 0)
             {
                 MessageBox.Show("璇疯緭鍏ユ纭噸閲忥紒", "鎻愮ず");
+                return false;
+            }
+            else if (DBUtility.ClsPub.isInt(txtHBarcodeNo.Text) == 0)
+            {
+                MessageBox.Show("璇疯緭鍏ュ寘鍙凤紒", "鎻愮ず");
                 return false;
             }
             else if (HWhID==0)
@@ -568,6 +595,8 @@
             string HMaterName = "";
             string HMaterModel = "";
             string ProcessExchangeBillNo = "";
+            Int64 HBarcodeNo = 0;       //鍖呮暟
+            Int64 HBadReasonID = 0;     //涓嶈壇鍘熷洜ID
 
             HBarCode = TM;
             HBarCodeType = DBUtility.ClsPub.isStrNull(cmbHBarCodeType.Text);
@@ -579,6 +608,8 @@
             HMaterName = DBUtility.ClsPub.isStrNull(txtHMaterName.Text);
             HMaterModel = DBUtility.ClsPub.isStrNull(txtHMaterModel.Text);
             ProcessExchangeBillNo = DBUtility.ClsPub.isStrNull(txtHBillNo.Text);
+            HBarcodeNo = DBUtility.ClsPub.isLong(txtHBarcodeNo.Text);
+            HBadReasonID = DBUtility.ClsPub.isLong(txtHRemark.Tag);
 
             try
             {
@@ -591,16 +622,16 @@
                 ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " +
                 ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate,HMaterialJQty,HMaterialMQty " +
                 ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HGiveAwayFlag " +
-                ",HOrderInterID,HOrderEntryID,HOrderBillNo " +
+                ",HOrderInterID,HOrderEntryID,HOrderBillNo,HCustomQty1 " +
                 ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " +
                 ") Values ("
                 + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty.ToString()
                 + ",'" + HBatchNo + "'," + HSupID.ToString() + ",0,'" + HMaker + "',getdate(),0," + HQty.ToString()
                 + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "',''"
-                + ", 1,1," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'"
+                + ", 1," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'"
                 + ", 0,'',getdate(),'','" + sDate + "'," + HMaterialJQty.ToString() + "," + HMaterialMQty.ToString()
                 + ", " + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",''," + HInterID.ToString() + ",0"
-                + ", " + ProcessExchangeInterID.ToString() + ",0,'" + ProcessExchangeBillNo + "'"
+                + ", " + ProcessExchangeInterID.ToString() + ",0,'" + ProcessExchangeBillNo + "'," + HBadReasonID.ToString()
                 + ",'" + HMaterName + "','" + HMaterModel + "',''," + HAuxPropID.ToString() + ",'','')");
 
                 //鍥炲~鏈�澶ф祦姘村彿
@@ -623,7 +654,7 @@
                     + "," + HWhID.ToString() + ",0," + HSPID.ToString() + ",0,0,''"
                     +",0," + HQty.ToString() + ",1,'" + HBatchNo + "','" + HBarCode + "',''"
                     +",'" + HMaker + "',getdate()," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillType + "','" + HSourceBillNo + "'"
-                    +",0,0,'0',0,'',0"
+                    +",0,0,'',0,'',0"
                     +"," + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",'','绉伴噸鍏ュ簱鐢熸垚','2'"
                     +",0,0,'',0)");
 
@@ -708,5 +739,202 @@
 
         #endregion
 
+        #region  //浣滃簾
+        private void cmdZF_Click(object sender, EventArgs e)
+        {
+            if (grdMain.CurrentRow == null)
+            {
+                MessageBox.Show("璇峰厛閫夋嫨闇�瑕佷綔搴熺殑鏉$爜锛�", "鎻愮ず");
+                return;
+            }
+            else
+            {
+                if (MessageBox.Show("纭畾瑕佷綔搴熸墍閫夋潯鐮侊紵", "鎻愮ず", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
+                {
+                    return;
+                }
+                else
+                {
+                    string HRemark = "";
+                    string HItemID = "";
+                    string HBarCode = "";
+                    string HBarCode2 = "";
+                    for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++)
+                    {
+                        HItemID = HItemID + "," + DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString());
+                        HBarCode = HBarCode + ",'" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value) + "'";
+                        if (i != 0 && i % 100 == 0)
+                        {
+                            HBarCode2 = HBarCode2 + "#" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value);
+                        }
+                        else
+                        {
+                            HBarCode2 = HBarCode2 + "," + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value);
+                        }
+                        if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("浣滃簾鏍囪")].Value) != "")
+                        {
+                            HRemark = HRemark + "銆�" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value);
+                        }
+                    }
+                    if (HRemark != "")
+                    {
+                        MessageBox.Show("鎵�閫夋潯鐮佺紪鍙凤細"+ HRemark.Remove(0, 1)+" 宸蹭綔搴燂紝涓嶅厑璁搁噸澶嶄綔搴燂紒", "鎻愮ず");
+                        return;
+                    }
+                    HItemID = HItemID.Remove(0, 1);     //鍘绘帀瀛楃涓茬涓�涓瓧绗�
+                    HBarCode = HBarCode.Remove(0, 1);
+                    HBarCode2 = HBarCode2.Remove(0, 1);
+
+                    try
+                    {
+                        oCn.BeginTran();
+                        string[] NewBarCode;
+                        NewBarCode = HBarCode2.Split(Convert.ToChar("#"));
+
+                        //浣滃簾鏉$爜
+                        oCn.RunProc("update Gy_BarCodeBill set HStopflag=1,HDeleteMan='" + DBUtility.ClsPub.CurUserName + "',HDeleteDate=getdate() where HItemID in (" + HItemID + ")", ref DBUtility.ClsPub.sExeReturnInfo);
+                        //鍒犻櫎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍
+                        oCn.RunProc("delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HBarCode in (" + HBarCode + ")", ref DBUtility.ClsPub.sExeReturnInfo);
+                        //鍐欏叆绯荤粺鏃ュ織
+                        for (int i = 0; i <= NewBarCode.Length - 1; i++)
+                        {
+                            oCn.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.ComputerName + "','浣滃簾鏉$爜锛�" + NewBarCode[i] + "','绉伴噸鍏ュ簱妯″潡','" + DBUtility.ClsPub.IPAddress + "','浣滃簾'", ref DBUtility.ClsPub.sExeReturnInfo);
+                        }
+                        oCn.Commit();
+                    }
+                    catch (Exception e2)
+                    {
+                        oCn.RollBack();
+                        MessageBox.Show("浣滃簾鏉$爜澶辫触锛�" + e2.Message, "鎻愮ず");
+                        return;
+                    }
+                    //鍒锋柊绉伴噸璁板綍鍒楄〃淇℃伅
+                    BarCode_Display();
+                    MessageBox.Show("鎵�閫夋潯鐮佺紪鍙凤細" + HBarCode.Remove(0, 1) + " 浣滃簾鎴愬姛锛�", "鎻愮ず");
+                }
+            }
+        }
+
+        #endregion
+
+        #region  //鍙嶄綔搴�
+        private void cmdFZF_Click(object sender, EventArgs e)
+        {
+            if (grdMain.CurrentRow == null)
+            {
+                MessageBox.Show("璇峰厛閫夋嫨闇�瑕佸弽浣滃簾鐨勬潯鐮侊紒", "鎻愮ず");
+                return;
+            }
+            else
+            {
+                if (MessageBox.Show("纭畾瑕佸弽浣滃簾鎵�閫夋潯鐮侊紵", "鎻愮ず", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
+                {
+                    return;
+                }
+                else
+                {
+                    string HRemark = "";
+                    string HItemID = "";
+                    string HBarCode = "";
+                    string HBarCode2 = "";
+                    for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++)
+                    {
+                        HItemID = HItemID + "," + DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString());
+                        HBarCode = HBarCode + ",'" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value) + "'";
+                        if (i != 0 && i % 100 == 0)
+                        {
+                            HBarCode2 = HBarCode2 + "#" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value);
+                        }
+                        else
+                        {
+                            HBarCode2 = HBarCode2 + "," + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value);
+                        }
+                        if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("浣滃簾鏍囪")].Value) == "")
+                        {
+                            HRemark = HRemark + "銆�" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value);
+                        }
+                    }
+                    if (HRemark != "")
+                    {
+                        MessageBox.Show("鎵�閫夋潯鐮佺紪鍙凤細" + HRemark.Remove(0, 1) + " 鏈綔搴燂紝涓嶅厑璁稿弽浣滃簾锛�", "鎻愮ず");
+                        return;
+                    }
+                    HItemID = HItemID.Remove(0, 1);     //鍘绘帀瀛楃涓茬涓�涓瓧绗�
+                    HBarCode = HBarCode.Remove(0, 1);
+                    HBarCode2 = HBarCode2.Remove(0, 1);
+
+                    try
+                    {
+                        oCn.BeginTran();
+                        string[] NewBarCode;
+                        NewBarCode = HBarCode2.Split(Convert.ToChar("#"));
+
+                        //鍙嶄綔搴熸潯鐮�
+                        oCn.RunProc("update Gy_BarCodeBill set HStopflag=0,HDeleteMan='',HDeleteDate=null where HItemID in (" + HItemID + ")", ref DBUtility.ClsPub.sExeReturnInfo);
+
+                        //鍒犻櫎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍
+                        oCn.RunProc("delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HBarCode in (" + HBarCode + ")", ref DBUtility.ClsPub.sExeReturnInfo);
+
+                        //鍐欏叆鏉$爜鍑哄叆搴撲复鏃惰〃
+                        oCn.RunProc("Insert into KF_PonderationBillMain_Temp " +
+                        "(HInterID,HBillNo,HBillType,HMaterID,HAuxPropID,HProcID" +
+                        ",HWhID,HSCWHID,HStockPlaceID,HOutStockPlaceID,HGroupID,HAddr" +
+                        ",HQtyMust,HQty,HPieceQty,HBatchNo,HBarCode,HBarCode_Pack" +
+                        ",HMaker,HMakeDate,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo" +
+                        ",HRelationInterID,HRelationEntryID,HRelationBillNo,HRedBlueFlag,HMTONo,HPlanMode" +
+                        ",HSTOCKORGID,HOtherOrgID,HOWNERID,HOWNERTYPEID,HExpressNumber,HSubBillType" +
+                        ",HCusID,HDeptID,HCusBarCode,HMulSourceBill) " +
+                        " select " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "',HMaterID,HAuxPropID,0" +
+                        ",HWhID,0,HSPID,0,0,''" +
+                        ",0,HQty,1,HBatchNo,HBarCode,''" +
+                        ",'" + HMaker + "',getdate(),HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo" +
+                        ",0,0,'',0,'',0" +
+                        ",HSTOCKORGID,HSTOCKORGID,HSTOCKORGID,'','绉伴噸鍏ュ簱鐢熸垚-鍙嶄綔搴�','2'" +
+                        ",0,0,'',0" +
+                        "from Gy_BarCodeBill with(nolock) where HItemID in (" + HItemID + ")"
+                        );
+
+                        //鍐欏叆绯荤粺鏃ュ織
+                        for (int i = 0; i <= NewBarCode.Length - 1; i++)
+                        {
+                            oCn.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.ComputerName + "','鍙嶄綔搴熸潯鐮侊細" + NewBarCode[i] + "','绉伴噸鍏ュ簱妯″潡','" + DBUtility.ClsPub.IPAddress + "','鍙嶄綔搴�'", ref DBUtility.ClsPub.sExeReturnInfo);
+                        }
+                        oCn.Commit();
+                    }
+                    catch (Exception e2)
+                    {
+                        oCn.RollBack();
+                        MessageBox.Show("鍙嶄綔搴熸潯鐮佸け璐ワ紒" + e2.Message, "鎻愮ず");
+                        return;
+                    }
+                    //鍒锋柊绉伴噸璁板綍鍒楄〃淇℃伅
+                    BarCode_Display();
+                    MessageBox.Show("鎵�閫夋潯鐮佺紪鍙凤細" + HBarCode.Remove(0, 1) + " 鍙嶄綔搴熸垚鍔燂紒", "鎻愮ず");
+                }
+            }
+        }
+
+
+        #endregion
+
+        #region  //澶囨敞   涓嶈壇鍘熷洜閫夋嫨
+        private void cmdHBadReasonID_Click(object sender, EventArgs e)
+        {
+            DAL.ClsGy_BadReason_View oBadReason = new DAL.ClsGy_BadReason_View();
+            if (oBadReason.RefreshView())
+            {
+                this.txtHRemark.Text = oBadReason.oModel.HName;
+                this.txtHRemark.Tag = oBadReason.oModel.HItemID.ToString();
+            }
+        }
+
+        #endregion
+
+
+
+
+
+
+
     }
 }
\ No newline at end of file
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.designer.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.designer.cs"
index bd6d605..5094230 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.designer.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.designer.cs"
@@ -30,8 +30,8 @@
         {
             this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Kf_WeighToBarCode));
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
             this.Tool = new System.Windows.Forms.ToolStrip();
             this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
             this.mrlk = new System.Windows.Forms.ToolStripButton();
@@ -55,6 +55,8 @@
             this.label4 = new System.Windows.Forms.Label();
             this.txtHMaterNumber = new System.Windows.Forms.TextBox();
             this.gbUp = new System.Windows.Forms.GroupBox();
+            this.cmdFZF = new System.Windows.Forms.Button();
+            this.cmdZF = new System.Windows.Forms.Button();
             this.txtHDeptName = new System.Windows.Forms.TextBox();
             this.label12 = new System.Windows.Forms.Label();
             this.txtHBatchNo = new System.Windows.Forms.TextBox();
@@ -88,6 +90,10 @@
             this.涓棿 = new System.Windows.Forms.Panel();
             this.搴曢儴 = new System.Windows.Forms.Panel();
             this.鍙充晶 = new System.Windows.Forms.Panel();
+            this.chkHDYFlag = new System.Windows.Forms.CheckBox();
+            this.cmdHBadReasonID = new System.Windows.Forms.Button();
+            this.label13 = new System.Windows.Forms.Label();
+            this.txtHBarcodeNo = new System.Windows.Forms.TextBox();
             this.Tool.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.grdMain)).BeginInit();
             this.gbUp.SuspendLayout();
@@ -260,14 +266,14 @@
             this.grdMain.AllowUserToDeleteRows = false;
             this.grdMain.BackgroundColor = System.Drawing.SystemColors.ControlLightLight;
             this.grdMain.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle1.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.grdMain.DefaultCellStyle = dataGridViewCellStyle1;
+            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle7.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.grdMain.DefaultCellStyle = dataGridViewCellStyle7;
             this.grdMain.Dock = System.Windows.Forms.DockStyle.Fill;
             this.grdMain.Location = new System.Drawing.Point(3, 3);
             this.grdMain.Margin = new System.Windows.Forms.Padding(0);
@@ -317,7 +323,8 @@
             this.txtHRemark.ImeMode = System.Windows.Forms.ImeMode.NoControl;
             this.txtHRemark.Location = new System.Drawing.Point(102, 112);
             this.txtHRemark.Name = "txtHRemark";
-            this.txtHRemark.Size = new System.Drawing.Size(713, 21);
+            this.txtHRemark.ReadOnly = true;
+            this.txtHRemark.Size = new System.Drawing.Size(691, 21);
             this.txtHRemark.TabIndex = 53;
             // 
             // label4
@@ -344,6 +351,12 @@
             // gbUp
             // 
             this.gbUp.BackColor = System.Drawing.Color.Transparent;
+            this.gbUp.Controls.Add(this.label13);
+            this.gbUp.Controls.Add(this.txtHBarcodeNo);
+            this.gbUp.Controls.Add(this.cmdHBadReasonID);
+            this.gbUp.Controls.Add(this.chkHDYFlag);
+            this.gbUp.Controls.Add(this.cmdFZF);
+            this.gbUp.Controls.Add(this.cmdZF);
             this.gbUp.Controls.Add(this.txtHDeptName);
             this.gbUp.Controls.Add(this.label12);
             this.gbUp.Controls.Add(this.txtHBatchNo);
@@ -376,6 +389,32 @@
             this.gbUp.Size = new System.Drawing.Size(1105, 186);
             this.gbUp.TabIndex = 58;
             this.gbUp.TabStop = false;
+            // 
+            // cmdFZF
+            // 
+            this.cmdFZF.BackColor = System.Drawing.Color.White;
+            this.cmdFZF.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cmdFZF.Location = new System.Drawing.Point(729, 142);
+            this.cmdFZF.Margin = new System.Windows.Forms.Padding(2);
+            this.cmdFZF.Name = "cmdFZF";
+            this.cmdFZF.Size = new System.Drawing.Size(86, 32);
+            this.cmdFZF.TabIndex = 157;
+            this.cmdFZF.Text = "鍙嶄綔搴�";
+            this.cmdFZF.UseVisualStyleBackColor = false;
+            this.cmdFZF.Click += new System.EventHandler(this.cmdFZF_Click);
+            // 
+            // cmdZF
+            // 
+            this.cmdZF.BackColor = System.Drawing.Color.White;
+            this.cmdZF.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cmdZF.Location = new System.Drawing.Point(635, 142);
+            this.cmdZF.Margin = new System.Windows.Forms.Padding(2);
+            this.cmdZF.Name = "cmdZF";
+            this.cmdZF.Size = new System.Drawing.Size(86, 32);
+            this.cmdZF.TabIndex = 156;
+            this.cmdZF.Text = "浣滃簾";
+            this.cmdZF.UseVisualStyleBackColor = false;
+            this.cmdZF.Click += new System.EventHandler(this.cmdZF_Click);
             // 
             // txtHDeptName
             // 
@@ -597,14 +636,14 @@
             this.grdSub.AllowUserToDeleteRows = false;
             this.grdSub.BackgroundColor = System.Drawing.SystemColors.ControlLightLight;
             this.grdSub.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle2.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.grdSub.DefaultCellStyle = dataGridViewCellStyle2;
+            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle8.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.grdSub.DefaultCellStyle = dataGridViewCellStyle8;
             this.grdSub.Dock = System.Windows.Forms.DockStyle.Fill;
             this.grdSub.Location = new System.Drawing.Point(0, 73);
             this.grdSub.Margin = new System.Windows.Forms.Padding(0);
@@ -736,6 +775,49 @@
             this.鍙充晶.Size = new System.Drawing.Size(12, 627);
             this.鍙充晶.TabIndex = 64;
             // 
+            // chkHDYFlag
+            // 
+            this.chkHDYFlag.AutoSize = true;
+            this.chkHDYFlag.Location = new System.Drawing.Point(558, 156);
+            this.chkHDYFlag.Margin = new System.Windows.Forms.Padding(2);
+            this.chkHDYFlag.Name = "chkHDYFlag";
+            this.chkHDYFlag.Size = new System.Drawing.Size(72, 16);
+            this.chkHDYFlag.TabIndex = 316;
+            this.chkHDYFlag.Text = "鑷姩鎵撳嵃";
+            this.chkHDYFlag.UseVisualStyleBackColor = true;
+            // 
+            // cmdHBadReasonID
+            // 
+            this.cmdHBadReasonID.BackColor = System.Drawing.Color.Transparent;
+            this.cmdHBadReasonID.Image = ((System.Drawing.Image)(resources.GetObject("cmdHBadReasonID.Image")));
+            this.cmdHBadReasonID.ImageAlign = System.Drawing.ContentAlignment.TopRight;
+            this.cmdHBadReasonID.Location = new System.Drawing.Point(793, 111);
+            this.cmdHBadReasonID.Name = "cmdHBadReasonID";
+            this.cmdHBadReasonID.Size = new System.Drawing.Size(22, 22);
+            this.cmdHBadReasonID.TabIndex = 317;
+            this.cmdHBadReasonID.UseVisualStyleBackColor = false;
+            this.cmdHBadReasonID.Click += new System.EventHandler(this.cmdHBadReasonID_Click);
+            // 
+            // label13
+            // 
+            this.label13.AutoSize = true;
+            this.label13.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label13.ForeColor = System.Drawing.Color.Black;
+            this.label13.Location = new System.Drawing.Point(633, 88);
+            this.label13.Name = "label13";
+            this.label13.Size = new System.Drawing.Size(29, 12);
+            this.label13.TabIndex = 318;
+            this.label13.Text = "鍖呭彿";
+            // 
+            // txtHBarcodeNo
+            // 
+            this.txtHBarcodeNo.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtHBarcodeNo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+            this.txtHBarcodeNo.Location = new System.Drawing.Point(687, 84);
+            this.txtHBarcodeNo.Name = "txtHBarcodeNo";
+            this.txtHBarcodeNo.Size = new System.Drawing.Size(128, 21);
+            this.txtHBarcodeNo.TabIndex = 319;
+            // 
             // Kf_WeighToBarCode
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -827,5 +909,11 @@
         private System.Windows.Forms.Panel 涓棿;
         private System.Windows.Forms.Panel 搴曢儴;
         private System.Windows.Forms.Panel 鍙充晶;
+        private System.Windows.Forms.Button cmdFZF;
+        private System.Windows.Forms.Button cmdZF;
+        private System.Windows.Forms.CheckBox chkHDYFlag;
+        private System.Windows.Forms.Button cmdHBadReasonID;
+        private System.Windows.Forms.Label label13;
+        private System.Windows.Forms.TextBox txtHBarcodeNo;
     }
 }
\ No newline at end of file
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.resx" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.resx"
index b0138bd..f9ea286 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.resx"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.resx"
@@ -435,6 +435,21 @@
   <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>102, 16</value>
   </metadata>
+  <data name="cmdHBadReasonID.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        R0lGODlhEAAQAIZBAAAzmQBmzP///1o7AJlmAOazAMTz/9mmAEW5//nNT+W5ToPV/5TW/cyZAAyf/7Dp
+        /yOn/2jD/q3h/le8/sz3/5zg/7bt/73l/7Xs/2fH/4DT///bnZXb/97//2rK/wWb/8np/6zf/1S//77x
+        /73w/8Xv/1+//wmc/1jA/5Db/5LV/6rn/6Xb/zCt/33O/9X3/4LO/7jj/4PT/x+m/7nk/3XP/3PJ/3bQ
+        /6Tb/5Td/zCv/3fM/029/4za/6Pf/ZHc/6Pk/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEBAAAh+QQB
+        AABBACwAAAAAEAAQAAAIqACDCBwoMIDBAAQTBjEYIcKECQYVLmQQ44KJFhBmQECYMAAOEAJYnPjgwAHH
+        gQEYqAhBA4YOBDwQIDg5cYcLGyg8LOixYAFNABJkZBBRI8cDEg98ACAIlIOGGylWGOhgwMBSphUq/ACC
+        wQAFClcFEiAAQICAEhZGvDAbloCCDQUAlDUrQO5AtwkKHBgQRK7duwryHmjAV2IQAoIJGxY4QK/ixYwH
+        FIYcEAA7
+</value>
+  </data>
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>37</value>
   </metadata>

--
Gitblit v1.9.1