From 53cbda77d64daa08a0c1f3ba4ff0a65d508665d5 Mon Sep 17 00:00:00 2001 From: yxj <yxj@hz-kingdee.com> Date: 星期四, 17 十月 2024 09:51:16 +0800 Subject: [PATCH] 乔一称重入库条码生成模块,托条码生成完善 --- WarM/条码打印/Kf_WeighToBarCode.designer.cs | 174 +++++++++++---------- WarM/条码打印/Kf_WeighToBarCode.cs | 282 ++++++++++++++++++++++++++++------ 2 files changed, 325 insertions(+), 131 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 06a734f..73869ac 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" @@ -28,6 +28,8 @@ public Int64 HInterID = 0; public string HBillNo = ""; public string HBillType = "1202"; + public Int64 HMaterID = 0; + public string HBatchNo = ""; public Int64 HAuxPropID = 0; public Int64 HUnitID = 0; public Int64 HWhID = 0; @@ -48,6 +50,8 @@ public string PrintQtyCtl = ""; //鏉$爜鎵撳嵃娆℃暟鎺у埗 public string UpdatePrintQtyCtl = ""; //鏉$爜鎵撳嵃娆℃暟鏇存柊 public string sBarCodeItemID = ""; //鏉$爜鑷鍒� + public string HBarCode_Pack = ""; //鎵樻潯鐮� + public long HSNo = 0; //缁勬墭璁℃暟鐢� public DAL.ClsGy_BarCodeBill_Ctl oBar = new DAL.ClsGy_BarCodeBill_Ctl(); public DBUtility.ClsPub.Enum_BillStatus BillStatus; SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); @@ -113,11 +117,15 @@ { HInterID = DBUtility.ClsPub.CreateBillID_Prod(HBillType, ref DBUtility.ClsPub.sExeReturnInfo); //寰楀埌鏂板崟鎹甀D HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref DBUtility.ClsPub.sExeReturnInfo, true); //寰楀埌鏂板崟鎹彿 + HSNo = 0; + this.lblSNo.Text = ""; } else if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1) { HInterID = DBUtility.ClsPub.CreateBillID_Prod(HBillType, ref DBUtility.ClsPub.sExeReturnInfo); //寰楀埌鏂板崟鎹甀D HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref DBUtility.ClsPub.sExeReturnInfo, true); //寰楀埌鏂板崟鎹彿 + HSNo = 0; + this.lblSNo.Text = ""; } else { @@ -129,7 +137,7 @@ if (grdSub.Rows.Count > 0) { grdSub.Rows[0].Selected = true; - SourceBill(); + SourceBill(1); txtHQty.Focus(); } else @@ -328,6 +336,12 @@ return false; } + if (DBUtility.ClsPub.isStrNull(txtHBarCode_Pack.Text) != "") + { + MessageBox.Show("褰撳墠缁勬墭鏈粨鏉燂紝璇风粨鏉熺粍鎵樺悗鍐嶇偣鍑绘崲鐝紒", "鎻愮ず"); + return false; + } + //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞� string s = ""; int sYear = 0; @@ -413,8 +427,7 @@ } Source_Display(); grdSub.Rows[0].Selected = true; - DBUtility.Xt_BaseBillFun.Sub_ClearBill(gbUp); - SourceBill(); + SourceBill(2); txtHBarCode.Text = ""; txtHQty.Focus(); } @@ -430,8 +443,7 @@ } Source_Display(); grdSub.Rows[0].Selected = true; - DBUtility.Xt_BaseBillFun.Sub_ClearBill(gbUp); - SourceBill(); + SourceBill(2); txtHBarCode.Text = ""; txtHQty.Focus(); } @@ -462,11 +474,6 @@ private void cmdSourceBillNo_Click(object sender, EventArgs e) { - //鍒濆鍖栧彸杈硅〃澶翠俊鎭� - cmbHBarCodeType.Items.Clear(); - cmbHBarCodeType.Items.Add("鍞竴鏉$爜"); - DBUtility.Xt_BaseBillFun.Sub_ClearBill(gbUp); - if (grdSub.CurrentRow == null) { MessageBox.Show("璇峰湪宸﹁竟鍗曟嵁鍒楄〃涓�夋嫨涓�琛屽崟鎹紒", "鎻愮ず"); @@ -479,7 +486,7 @@ } else { - SourceBill(); + SourceBill(3); txtHQty.Focus(); } } @@ -496,6 +503,10 @@ } SaveBarCode(); BarCode_Display(); + if (DBUtility.ClsPub.isStrNull(txtHBarCode_Pack.Text) != "") + { + this.lblSNo.Text = "褰撳墠宸茬粍 " + HSNo + " 浠�"; + } grdMain.Rows[0].Selected = true; sBarCodeItemID = DBUtility.ClsPub.isLong(grdMain.Rows[grdMain.SelectedRows[0].Index].Cells[Fun_GetCol("HItemID")].Value).ToString(); @@ -703,7 +714,6 @@ Int64 HBadReasonID = 0; //涓嶈壇鍘熷洜ID string HCusMaterName = ""; //瀹㈡埛鐗╂枡鍚嶇О string HCusModel = ""; //瀹㈡埛瑙勬牸鍨嬪彿 - string HBarCode_Pack = ""; //鎵樼洏鏉$爜 HBarCode = TM; HBarCodeType = DBUtility.ClsPub.isStrNull(cmbHBarCodeType.Text); @@ -720,7 +730,10 @@ HBadReasonID = DBUtility.ClsPub.isLong(txtHRemark.Tag); HCusMaterName = DBUtility.ClsPub.isStrNull(txtHCusMaterName.Text); HCusModel = DBUtility.ClsPub.isStrNull(txtHCusModel.Text); - HBarCode_Pack = DBUtility.ClsPub.isStrNull(txtHBarCode_Pack.Text); + if (HBarCode_Pack != "") + { + HSNo = HSNo + 1; + } try { @@ -734,7 +747,7 @@ ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate,HMaterialJQty,HMaterialMQty,HNowQty " + ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HGiveAwayFlag,HBarCode_Pack " + ",HOrderInterID,HOrderEntryID,HOrderBillNo,HCustomQty1,HMaterialModel,HCusModel " + - ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo,HLogo " + + ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo,HLogo,HPackflag " + ") Values (" + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty.ToString() + ",'" + HBatchNo + "'," + HSupID.ToString() + ",0,'" + HMaker + "',getdate(),0," + HQty.ToString() @@ -743,7 +756,7 @@ + ", 0,'',getdate(),'','" + sDate + "'," + HMaterialJQty.ToString() + "," + HMaterialMQty.ToString() + "," + HNowQty.ToString() + ", " + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",''," + HInterID.ToString() + ",0,'" + HBarCode_Pack + "'" + ", " + HProcessExchangeInterID.ToString() + ",0,'" + HProcessExchangeBillNo + "'," + HBadReasonID.ToString() + ",'" + HCusMaterName + "','" + HCusModel + "'" - + ",'" + HMaterName + "','" + HMaterModel + "',''," + HAuxPropID.ToString() + ",'','','1')"); + + ",'" + HMaterName + "','" + HMaterModel + "',''," + HAuxPropID.ToString() + ",'','','1',0)"); //鍥炲~鏈�澶ф祦姘村彿 oCn.RunProc("exec h_p_WMS_SetMaxNo_QTY '" + sTMNumber + "',1 "); @@ -782,9 +795,53 @@ #region //杩斿洖淇℃伅 - //杩斿洖婧愬崟鍒楄〃淇℃伅 - private void SourceBill() + //杩斿洖婧愬崟鍒楄〃淇℃伅(num=1锛屾墦寮�妯″潡鏃跺姞杞芥樉绀猴紱num=2锛屾壂娴佽浆鍗℃樉绀猴紱num=3锛岄�夊崟鎸夐挳鏄剧ず) + private void SourceBill(int num) { + //鎵撳紑妯″潡鏃跺姞杞芥樉绀� + if (num == 1) + { + txtHBarCode_Pack.Text = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HBarCode_Pack")].Value); + HBarCode_Pack = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HBarCode_Pack")].Value); + HSNo = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HSNo")].Value); + if (HBarCode_Pack == "") + { + this.lblSNo.Text = ""; + } + else + { + this.lblSNo.Text = "褰撳墠宸茬粍 " + HSNo + " 浠�"; + cmdHBPack.Enabled = false; + } + } + //鎵祦杞崱鏄剧ず + if (num == 2) + { + //鍒濆鍖栧彸杈硅〃澶翠俊鎭� + DBUtility.Xt_BaseBillFun.Sub_ClearBill(gbUp); + if (HBarCode_Pack != "") + { + txtHBarCode_Pack.Text = HBarCode_Pack; + this.lblSNo.Text = "褰撳墠宸茬粍 " + HSNo + " 浠�"; + } + } + //閫夊崟鎸夐挳鏄剧ず + if (num == 3) + { + if (HSNo != 0 && (HMaterID != DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HMaterID")].Value) + || HBatchNo != DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("鎵瑰彿")].Value))) + { + MessageBox.Show("鎵�鎵弿娴佽浆鍗″搴旂墿鏂欍�佹壒鍙蜂笌褰撳墠姝e湪缁勬墭鐗╂枡銆佹壒鍙蜂笉涓�鑷达紝涓嶅悓鐗╂枡銆佹壒鍙蜂笉鍏佽缁勬墭鍦ㄥ悓涓�鎵樹笂锛屽闇�鎹㈢墿鏂欑敓鎴愭潯鐮佽鍏堢粨鏉熷綋鍓嶇粍鎵橈紒", "鎻愮ず"); + return; + } + //鍒濆鍖栧彸杈硅〃澶翠俊鎭� + DBUtility.Xt_BaseBillFun.Sub_ClearBill(gbUp); + if (HBarCode_Pack != "") + { + txtHBarCode_Pack.Text = HBarCode_Pack; + this.lblSNo.Text = "褰撳墠宸茬粍 " + HSNo + " 浠�"; + } + } txtHBillNo.Text = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("鍗曟嵁鍙�")].Value); txtHDeptName.Tag = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HDeptID")].Value); txtHDeptName.Text = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("杞﹂棿")].Value); @@ -795,6 +852,8 @@ txtHBatchNo.Text = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("鎵瑰彿")].Value); txtHCusMaterName.Text = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HCusMaterName")].Value); txtHCusModel.Text = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HCusModel")].Value); + HMaterID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HMaterID")].Value); + HBatchNo = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("鎵瑰彿")].Value); HAuxPropID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HAuxPropID")].Value); HUnitID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HUnitID")].Value); HWhID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HWhID")].Value); @@ -874,6 +933,7 @@ string HItemID = ""; string HBarCode = ""; string HBarCode2 = ""; + long HSNo_Temp = HSNo; for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++) { HItemID = HItemID + "," + DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString()); @@ -890,14 +950,35 @@ { HRemark = HRemark + "銆�" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value); } + //鏇存柊褰撳墠宸茬粍鎵樹欢鏁� + if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("HBarCode_Pack")].Value) != "" + && DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("HBarCode_Pack")].Value) == HBarCode_Pack + && DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜绫诲瀷")].Value) != "鎵樼洏鏉$爜") + { + HSNo = HSNo - 1; + } if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜绫诲瀷")].Value) == "鎵樼洏鏉$爜") { - MessageBox.Show("鎵�閫夋潯鐮佺紪鍙凤細" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value) + " 涓烘墭鐩樻潯鐮侊紝涓嶅厑璁镐綔搴燂紒", "鎻愮ず"); - return; + if (DBUtility.ClsPub.isBool(grdMain.SelectedRows[i].Cells[Fun_GetCol("HPackflag")].Value)) + { + MessageBox.Show("鎵�閫夋潯鐮佺紪鍙凤細" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value) + " 涓烘墭鐩樻潯鐮侊紝涓斿凡缁勬墭鐢熸垚瀵瑰簲缁勬墭鍗曪紝涓嶅厑璁镐綔搴燂紒", "鎻愮ず"); + return; + } + else if (HSNo > 0) + { + MessageBox.Show("鎵�閫夋潯鐮佺紪鍙凤細" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value) + " 涓烘墭鐩樻潯鐮侊紝涓斿綋鍓嶆墭鐩樻潯鐮佷笅宸茬敓鎴愬搴旀潯鐮侊紝涓嶅厑璁镐綔搴燂紒", "鎻愮ず"); + return; + } + else + { + HBarCode_Pack = ""; + } } } if (HRemark != "") { + HSNo = HSNo_Temp; + HBarCode_Pack = DBUtility.ClsPub.isStrNull(txtHBarCode_Pack.Text); MessageBox.Show("鎵�閫夋潯鐮佺紪鍙凤細"+ HRemark.Remove(0, 1)+" 宸蹭綔搴燂紝涓嶅厑璁搁噸澶嶄綔搴燂紒", "鎻愮ず"); return; } @@ -925,11 +1006,23 @@ catch (Exception e2) { oCn.RollBack(); + HSNo = HSNo_Temp; + HBarCode_Pack = DBUtility.ClsPub.isStrNull(txtHBarCode_Pack.Text); MessageBox.Show("浣滃簾鏉$爜澶辫触锛�" + e2.Message, "鎻愮ず"); return; } //鍒锋柊绉伴噸璁板綍鍒楄〃淇℃伅 BarCode_Display(); + if (HBarCode_Pack != "") + { + this.lblSNo.Text = "褰撳墠宸茬粍 " + HSNo + " 浠�"; + } + else + { + txtHBarCode_Pack.Text = ""; + this.lblSNo.Text = ""; + cmdHBPack.Enabled = true; + } MessageBox.Show("鎵�閫夋潯鐮佺紪鍙凤細" + HBarCode.Remove(0, 1) + " 浣滃簾鎴愬姛锛�", "鎻愮ず"); } } @@ -957,7 +1050,27 @@ string HItemID = ""; string HBarCode = ""; string HBarCode2 = ""; - string HBarCode_Pack = DBUtility.ClsPub.isStrNull(txtHBarCode_Pack.Text); + long HSNo_Temp = HSNo; + bool HFlag = false; + + //鐣岄潰涓婁负鏈惎鐢ㄧ粍鎵樼姸鎬� + if (HBarCode_Pack == "") + { + for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++) + { + //鍒ゆ柇鏉$爜鏄惁涓烘墭鐩樻潯鐮侊紝鏈敓鎴愮粍鎵樺崟锛屽凡浣滃簾鐘舵�侊紝鐣岄潰涓婁负鏈粍鎵樼姸鎬� + if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜绫诲瀷")].Value) == "鎵樼洏鏉$爜" + && DBUtility.ClsPub.isBool(grdMain.SelectedRows[i].Cells[Fun_GetCol("HPackflag")].Value) == false + && DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("浣滃簾鏍囪")].Value) != "" + ) + { + HFlag = true; + HBarCode_Pack = DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("HBarCode_Pack")].Value); + break; + } + } + } + for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++) { HItemID = HItemID + "," + DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString()); @@ -974,20 +1087,44 @@ { HRemark = HRemark + "銆�" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value); } - if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜绫诲瀷")].Value) == "鎵樼洏鏉$爜") + + //鏉$爜涓虹粍鎵樻潯鐮� + if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("HBarCode_Pack")].Value) != "") { - MessageBox.Show("鎵�閫夋潯鐮佺紪鍙凤細" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value) + " 涓烘墭鐩樻潯鐮侊紝涓嶅厑璁稿弽浣滃簾锛�", "鎻愮ず"); - return; - } - if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("HBarCode_Pack")].Value) != "" - && DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("HBarCode_Pack")].Value) != HBarCode_Pack) - { - MessageBox.Show("鎵�閫夋潯鐮佺紪鍙凤細" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value) + " 宸茬敓鎴愬搴旂粍鎵樺崟锛屼笉鍏佽鍙嶄綔搴燂紒", "鎻愮ず"); - return; + //宸蹭笂浼犵敓鎴愮粍鎵樺崟 + if (DBUtility.ClsPub.isBool(grdMain.SelectedRows[i].Cells[Fun_GetCol("HPackflag")].Value)) + { + + } + //鏈笂浼犵敓鎴愮粍鎵樺崟 + else + { + //鏉$爜瀵瑰簲鎵樻潯鐮佸拰鐣岄潰涓婄殑鎵樻潯鐮佷竴鑷� + if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("HBarCode_Pack")].Value) == HBarCode_Pack) + { + //鏇存柊褰撳墠宸茬粍鎵樹欢鏁� + if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜绫诲瀷")].Value) != "鎵樼洏鏉$爜") + { + HSNo = HSNo + 1; + } + + } + //鏉$爜瀵瑰簲鎵樻潯鐮佸拰鐣岄潰涓婄殑鎵樻潯鐮佷笉涓�鑷� + else + { + MessageBox.Show("鎵�閫夋潯鐮佺紪鍙凤細" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value) + " 瀵瑰簲鎵樻潯鐮侊細" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("HBarCode_Pack")].Value) + " 宸茬敓鎴愮粍鎵樺崟锛屾垨宸蹭綔搴燂紝涓嶅厑璁稿弽浣滃簾锛�", "鎻愮ず"); + return; + } + } } } if (HRemark != "") { + HSNo = HSNo_Temp; + if(HFlag) + { + HBarCode_Pack = ""; + } MessageBox.Show("鎵�閫夋潯鐮佺紪鍙凤細" + HRemark.Remove(0, 1) + " 鏈綔搴燂紝涓嶅厑璁稿弽浣滃簾锛�", "鎻愮ず"); return; } @@ -1023,7 +1160,7 @@ ",0,0,'',0,'',0" + ",HSTOCKORGID,HSTOCKORGID,HSTOCKORGID,'','绉伴噸鍏ュ簱鐢熸垚-鍙嶄綔搴�','2'" + ",0,0,'',0" + - "from Gy_BarCodeBill with(nolock) where HItemID in (" + HItemID + ")" + "from Gy_BarCodeBill with(nolock) where HItemID in (" + HItemID + ") and HBarCodeType='鍞竴鏉$爜' " ); //鍐欏叆绯荤粺鏃ュ織 @@ -1036,11 +1173,28 @@ catch (Exception e2) { oCn.RollBack(); + HSNo = HSNo_Temp; + if (HFlag) + { + HBarCode_Pack = ""; + } MessageBox.Show("鍙嶄綔搴熸潯鐮佸け璐ワ紒" + e2.Message, "鎻愮ず"); return; } //鍒锋柊绉伴噸璁板綍鍒楄〃淇℃伅 BarCode_Display(); + if (HBarCode_Pack != "") + { + txtHBarCode_Pack.Text = HBarCode_Pack; + this.lblSNo.Text = "褰撳墠宸茬粍 " + HSNo + " 浠�"; + cmdHBPack.Enabled = false; + } + else + { + txtHBarCode_Pack.Text = ""; + this.lblSNo.Text = ""; + cmdHBPack.Enabled = true; + } MessageBox.Show("鎵�閫夋潯鐮佺紪鍙凤細" + HBarCode.Remove(0, 1) + " 鍙嶄綔搴熸垚鍔燂紒", "鎻愮ず"); } } @@ -1069,23 +1223,25 @@ { return; } + HSNo = 0; SavePackBarCode(); BarCode_Display(); + this.lblSNo.Text = "褰撳墠宸茬粍 " + HSNo + " 浠�"; grdMain.Rows[0].Selected = true; - txtHBarCode_Pack.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.SelectedRows[0].Index].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value); + HBarCode_Pack = DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.SelectedRows[0].Index].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value); cmdHBPack.Enabled = false; sBarCodeItemID = DBUtility.ClsPub.isLong(grdMain.Rows[grdMain.SelectedRows[0].Index].Cells[Fun_GetCol("HItemID")].Value).ToString(); //鑷姩鎵撳嵃 - if (chkHDYFlag.Checked == true) - { - //鎵撳嵃鏉$爜 - Sub_SetReport("鎵樼洏鏉$爜"); - Report.Print(false); - Thread.Sleep(1000); - } - else + //if (chkHDYFlag.Checked == true) + //{ + // //鎵撳嵃鏉$爜 + // Sub_SetReport("鎵樼洏鏉$爜"); + // Report.Print(false); + // Thread.Sleep(1000); + //} + //else { //閫夋嫨鎵撳嵃妯℃澘 BLL.Gy_OpenTmp oFrm = new BLL.Gy_OpenTmp(); @@ -1118,6 +1274,11 @@ if (HInterID == 0 || HBillNo == "") { MessageBox.Show("鑾峰彇鏉$爜瀵瑰簲鍗曟嵁ID鎴栧崟鎹彿澶辫触锛岃閲嶆柊鍒锋柊鐣岄潰锛�", "鎻愮ず"); + return false; + } + if (HProcessExchangeInterID == 0) + { + MessageBox.Show("璇峰厛鎵弿娴佽浆鍗″彿锛�", "鎻愮ず"); return false; } return true; @@ -1158,10 +1319,24 @@ TM = sTMNumber + LSH2; string HBarCode = ""; - string HBarCodeType = "鎵樼洏鏉$爜"; + string HBarCodeType = ""; + string HMaterID = ""; //鐗╂枡鍐呯爜 + string HBatchNo = ""; //鎵规 + string HMaterName = ""; + string HMaterModel = ""; + string HProcessExchangeBillNo = ""; + string HCusMaterName = ""; //瀹㈡埛鐗╂枡鍚嶇О + string HCusModel = ""; //瀹㈡埛瑙勬牸鍨嬪彿 HBarCode = TM; - HBarCodeType = ""; + HBarCodeType = "鎵樼洏鏉$爜"; + HMaterID = DBUtility.ClsPub.isStrNull(txtHMaterNumber.Tag); + HBatchNo = DBUtility.ClsPub.isStrNull(txtHBatchNo.Text); + HMaterName = DBUtility.ClsPub.isStrNull(txtHMaterName.Text); + HMaterModel = DBUtility.ClsPub.isStrNull(txtHMaterModel.Text); + HProcessExchangeBillNo = DBUtility.ClsPub.isStrNull(txtHBillNo.Text); + HCusMaterName = DBUtility.ClsPub.isStrNull(txtHCusMaterName.Text); + HCusModel = DBUtility.ClsPub.isStrNull(txtHCusModel.Text); try { @@ -1175,16 +1350,16 @@ ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate,HMaterialJQty,HMaterialMQty,HNowQty " + ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HGiveAwayFlag " + ",HOrderInterID,HOrderEntryID,HOrderBillNo,HCustomQty1,HMaterialModel,HCusModel " + - ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo,HLogo " + + ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo,HLogo,HPackflag " + ") Values (" - + "'" + HBarCode + "','" + HBarCodeType + "',0,0,1,'" + HBarCode + "'" - + ",'',0,0,'" + HMaker + "',getdate(),0,1" - + ",0,0,'','',''" + + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + ",1,'" + HBarCode + "'" + + ",'" + HBatchNo + "'," + HSupID.ToString() + ",0,'" + HMaker + "',getdate(),0,1" + + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "',''" + ",1,0,0,0,0,''" + ", 0,'',getdate(),'','" + sDate + "',0,0,0" + ", " + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",''," + HInterID.ToString() + ",0" - + ", " + HProcessExchangeInterID.ToString() + ",0,'',0,'',''" - + ",'','','',0,'','','1')"); + + ", " + HProcessExchangeInterID.ToString() + ",0,'" + HProcessExchangeBillNo + "',0,'" + HCusMaterName + "','" + HCusModel + "'" + + ",'" + HMaterName + "','" + HMaterModel + "',''," + HAuxPropID.ToString() + ",'','','1',0)"); //鍥炲~鏈�澶ф祦姘村彿 oCn.RunProc("exec h_p_WMS_SetMaxNo_QTY '" + sTMNumber + "',1 "); @@ -1203,8 +1378,6 @@ #region //缁撴潫缁勬墭 private void cmdHEPack_Click(object sender, EventArgs e) { - string HBarCode_Pack = DBUtility.ClsPub.isStrNull(txtHBarCode_Pack.Text); - //鐢熸垚缁勬墭鍗曞墠鍒ゆ柇 if(HBarCode_Pack=="") { @@ -1261,18 +1434,25 @@ ",HAuxPropID,HBatchNo,HMTONo" + ",HSourceID,HEquipID,HGroupID,HWorkerID,HStatus" + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType) " + - " select " + HPUInterID.ToString() + ",HItemID,'0,0,''" + + " select " + HPUInterID.ToString() + ",HItemID,0,0,''" + ",HMaterID,HUnitID,HQty,HBarCode,HBarCode_Pack,getdate()" + ",HAuxPropID,HBatchNo,HMTONo" + ",0,0,0,0,0" + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" + - "from Gy_BarCodeBill with(nolock) where HInterID=" + HInterID.ToString() + " and HBarCode_Pack='" + HBarCode_Pack + "' and HStopflag=0" + " from Gy_BarCodeBill with(nolock) where HInterID=" + HInterID.ToString() + " and HBarCode_Pack='" + HBarCode_Pack + "' and HStopflag=0 and HBarCodeType='鍞竴鏉$爜' " ); + + //鍥炲~鏉$爜妗f缁勬墭鏍囪 + oCn.RunProc("update Gy_BarCodeBill set HPackflag=1 where HInterID=" + HInterID.ToString() + " and HBarCode_Pack='" + HBarCode_Pack + "' and HStopflag=0", ref DBUtility.ClsPub.sExeReturnInfo); MessageBox.Show("鐢熸垚鐢熶骇缁勬墭鍗曪細" + HPUBillNo + " 鎴愬姛锛�", "鎻愮ず"); txtHBarCode_Pack.Text = ""; + HBarCode_Pack = ""; cmdHBPack.Enabled = true; + HSNo = 0; + this.lblSNo.Text = ""; + BarCode_Display(); oCn.Commit(); return; } 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 a98477c..5ad10db 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 dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = 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,11 @@ this.label4 = new System.Windows.Forms.Label(); this.txtHMaterNumber = new System.Windows.Forms.TextBox(); this.gbUp = new System.Windows.Forms.GroupBox(); + this.lblSNo = new System.Windows.Forms.Label(); + this.label18 = new System.Windows.Forms.Label(); + this.txtHBarCode_Pack = new System.Windows.Forms.TextBox(); + this.cmdHEPack = new System.Windows.Forms.Button(); + this.cmdHBPack = new System.Windows.Forms.Button(); this.textBox_COM = new System.Windows.Forms.TextBox(); this.label_COM = new System.Windows.Forms.Label(); this.button_OpenCom = new System.Windows.Forms.Button(); @@ -106,10 +111,6 @@ this.鍙充晶 = new System.Windows.Forms.Panel(); this.timer2 = new System.Windows.Forms.Timer(this.components); this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker(); - this.cmdHBPack = new System.Windows.Forms.Button(); - this.cmdHEPack = new System.Windows.Forms.Button(); - this.label18 = new System.Windows.Forms.Label(); - this.txtHBarCode_Pack = new System.Windows.Forms.TextBox(); this.Tool.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.grdMain)).BeginInit(); this.gbUp.SuspendLayout(); @@ -282,14 +283,14 @@ this.grdMain.AllowUserToDeleteRows = false; this.grdMain.BackgroundColor = System.Drawing.SystemColors.ControlLightLight; this.grdMain.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.grdMain.DefaultCellStyle = dataGridViewCellStyle3; + 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; 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); @@ -366,6 +367,7 @@ // gbUp // this.gbUp.BackColor = System.Drawing.Color.Transparent; + this.gbUp.Controls.Add(this.lblSNo); this.gbUp.Controls.Add(this.label18); this.gbUp.Controls.Add(this.txtHBarCode_Pack); this.gbUp.Controls.Add(this.cmdHEPack); @@ -419,6 +421,64 @@ this.gbUp.TabIndex = 58; this.gbUp.TabStop = false; // + // lblSNo + // + this.lblSNo.AutoSize = true; + this.lblSNo.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblSNo.ForeColor = System.Drawing.Color.Red; + this.lblSNo.Location = new System.Drawing.Point(843, 158); + this.lblSNo.Name = "lblSNo"; + this.lblSNo.Size = new System.Drawing.Size(20, 19); + this.lblSNo.TabIndex = 334; + this.lblSNo.Text = "."; + // + // label18 + // + this.label18.AutoSize = true; + this.label18.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label18.ForeColor = System.Drawing.Color.Black; + this.label18.Location = new System.Drawing.Point(638, 116); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(53, 12); + this.label18.TabIndex = 332; + this.label18.Text = "鎵樼洏鏉$爜"; + // + // txtHBarCode_Pack + // + this.txtHBarCode_Pack.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtHBarCode_Pack.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.txtHBarCode_Pack.Location = new System.Drawing.Point(693, 112); + this.txtHBarCode_Pack.Name = "txtHBarCode_Pack"; + this.txtHBarCode_Pack.ReadOnly = true; + this.txtHBarCode_Pack.Size = new System.Drawing.Size(128, 21); + this.txtHBarCode_Pack.TabIndex = 333; + // + // cmdHEPack + // + this.cmdHEPack.BackColor = System.Drawing.Color.White; + this.cmdHEPack.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.cmdHEPack.Location = new System.Drawing.Point(847, 89); + this.cmdHEPack.Margin = new System.Windows.Forms.Padding(2); + this.cmdHEPack.Name = "cmdHEPack"; + this.cmdHEPack.Size = new System.Drawing.Size(86, 44); + this.cmdHEPack.TabIndex = 331; + this.cmdHEPack.Text = "缁撴潫缁勬墭"; + this.cmdHEPack.UseVisualStyleBackColor = false; + this.cmdHEPack.Click += new System.EventHandler(this.cmdHEPack_Click); + // + // cmdHBPack + // + this.cmdHBPack.BackColor = System.Drawing.Color.White; + this.cmdHBPack.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.cmdHBPack.Location = new System.Drawing.Point(847, 28); + this.cmdHBPack.Margin = new System.Windows.Forms.Padding(2); + this.cmdHBPack.Name = "cmdHBPack"; + this.cmdHBPack.Size = new System.Drawing.Size(86, 44); + this.cmdHBPack.TabIndex = 330; + this.cmdHBPack.Text = "寮�濮嬬粍鎵�"; + this.cmdHBPack.UseVisualStyleBackColor = false; + this.cmdHBPack.Click += new System.EventHandler(this.cmdHBPack_Click); + // // textBox_COM // this.textBox_COM.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -444,7 +504,7 @@ this.button_OpenCom.BackColor = System.Drawing.Color.White; this.button_OpenCom.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button_OpenCom.Location = new System.Drawing.Point(429, 222); - this.button_OpenCom.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.button_OpenCom.Margin = new System.Windows.Forms.Padding(2); this.button_OpenCom.Name = "button_OpenCom"; this.button_OpenCom.Size = new System.Drawing.Size(86, 32); this.button_OpenCom.TabIndex = 327; @@ -457,7 +517,7 @@ this.button_getHWeight.BackColor = System.Drawing.Color.White; this.button_getHWeight.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button_getHWeight.Location = new System.Drawing.Point(322, 222); - this.button_getHWeight.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.button_getHWeight.Margin = new System.Windows.Forms.Padding(2); this.button_getHWeight.Name = "button_getHWeight"; this.button_getHWeight.Size = new System.Drawing.Size(86, 32); this.button_getHWeight.TabIndex = 326; @@ -568,7 +628,7 @@ // this.chkHDYFlag.AutoSize = true; this.chkHDYFlag.Location = new System.Drawing.Point(558, 236); - this.chkHDYFlag.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + 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; @@ -580,7 +640,7 @@ 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, 222); - this.cmdFZF.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + 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; @@ -593,7 +653,7 @@ 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, 222); - this.cmdZF.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + 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; @@ -729,7 +789,7 @@ this.cmdSave.BackColor = System.Drawing.Color.White; this.cmdSave.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.cmdSave.Location = new System.Drawing.Point(209, 222); - this.cmdSave.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.cmdSave.Margin = new System.Windows.Forms.Padding(2); this.cmdSave.Name = "cmdSave"; this.cmdSave.Size = new System.Drawing.Size(86, 32); this.cmdSave.TabIndex = 139; @@ -753,7 +813,7 @@ this.cmdSourceBillNo.BackColor = System.Drawing.Color.White; this.cmdSourceBillNo.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.cmdSourceBillNo.Location = new System.Drawing.Point(102, 222); - this.cmdSourceBillNo.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.cmdSourceBillNo.Margin = new System.Windows.Forms.Padding(2); this.cmdSourceBillNo.Name = "cmdSourceBillNo"; this.cmdSourceBillNo.Size = new System.Drawing.Size(86, 32); this.cmdSourceBillNo.TabIndex = 138; @@ -778,7 +838,7 @@ this.cmbHBarCodeType.Items.AddRange(new object[] { "鍞竴鏉$爜"}); this.cmbHBarCodeType.Location = new System.Drawing.Point(693, 28); - this.cmbHBarCodeType.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.cmbHBarCodeType.Margin = new System.Windows.Forms.Padding(2); this.cmbHBarCodeType.Name = "cmbHBarCodeType"; this.cmbHBarCodeType.Size = new System.Drawing.Size(128, 20); this.cmbHBarCodeType.TabIndex = 139; @@ -799,7 +859,7 @@ this.dtpHDate.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.dtpHDate.Format = System.Windows.Forms.DateTimePickerFormat.Short; this.dtpHDate.Location = new System.Drawing.Point(303, 28); - this.dtpHDate.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.dtpHDate.Margin = new System.Windows.Forms.Padding(2); this.dtpHDate.Name = "dtpHDate"; this.dtpHDate.Size = new System.Drawing.Size(128, 21); this.dtpHDate.TabIndex = 100; @@ -821,14 +881,14 @@ this.grdSub.AllowUserToDeleteRows = false; this.grdSub.BackgroundColor = System.Drawing.SystemColors.ControlLightLight; this.grdSub.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle4.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.grdSub.DefaultCellStyle = dataGridViewCellStyle4; + 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; 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); @@ -855,7 +915,7 @@ this.tabPage1.Controls.Add(this.grdMain); this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Name = "tabPage1"; - this.tabPage1.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); this.tabPage1.Size = new System.Drawing.Size(984, 340); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "绉伴噸璁板綍"; @@ -910,7 +970,7 @@ this.cmdOK.Cursor = System.Windows.Forms.Cursors.Default; this.cmdOK.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.cmdOK.Location = new System.Drawing.Point(189, 33); - this.cmdOK.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.cmdOK.Margin = new System.Windows.Forms.Padding(2); this.cmdOK.Name = "cmdOK"; this.cmdOK.Size = new System.Drawing.Size(55, 27); this.cmdOK.TabIndex = 150; @@ -963,53 +1023,6 @@ // timer2 // this.timer2.Tick += new System.EventHandler(this.timer2_Tick); - // - // cmdHBPack - // - this.cmdHBPack.BackColor = System.Drawing.Color.White; - this.cmdHBPack.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.cmdHBPack.Location = new System.Drawing.Point(847, 40); - this.cmdHBPack.Margin = new System.Windows.Forms.Padding(2); - this.cmdHBPack.Name = "cmdHBPack"; - this.cmdHBPack.Size = new System.Drawing.Size(86, 32); - this.cmdHBPack.TabIndex = 330; - this.cmdHBPack.Text = "寮�濮嬬粍鎵�"; - this.cmdHBPack.UseVisualStyleBackColor = false; - this.cmdHBPack.Click += new System.EventHandler(this.cmdHBPack_Click); - // - // cmdHEPack - // - this.cmdHEPack.BackColor = System.Drawing.Color.White; - this.cmdHEPack.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.cmdHEPack.Location = new System.Drawing.Point(847, 94); - this.cmdHEPack.Margin = new System.Windows.Forms.Padding(2); - this.cmdHEPack.Name = "cmdHEPack"; - this.cmdHEPack.Size = new System.Drawing.Size(86, 32); - this.cmdHEPack.TabIndex = 331; - this.cmdHEPack.Text = "缁撴潫缁勬墭"; - this.cmdHEPack.UseVisualStyleBackColor = false; - this.cmdHEPack.Click += new System.EventHandler(this.cmdHEPack_Click); - // - // label18 - // - this.label18.AutoSize = true; - this.label18.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label18.ForeColor = System.Drawing.Color.Black; - this.label18.Location = new System.Drawing.Point(638, 116); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(53, 12); - this.label18.TabIndex = 332; - this.label18.Text = "鎵樼洏鏉$爜"; - // - // txtHBarCode_Pack - // - this.txtHBarCode_Pack.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.txtHBarCode_Pack.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.txtHBarCode_Pack.Location = new System.Drawing.Point(693, 112); - this.txtHBarCode_Pack.Name = "txtHBarCode_Pack"; - this.txtHBarCode_Pack.ReadOnly = true; - this.txtHBarCode_Pack.Size = new System.Drawing.Size(128, 21); - this.txtHBarCode_Pack.TabIndex = 333; // // Kf_WeighToBarCode // @@ -1124,5 +1137,6 @@ private System.Windows.Forms.Button cmdHBPack; private System.Windows.Forms.Label label18; private System.Windows.Forms.TextBox txtHBarCode_Pack; + private System.Windows.Forms.Label lblSNo; } } \ No newline at end of file -- Gitblit v1.9.1