From cd17819c37fe4f3012faead82a6c55971ca2d6ee Mon Sep 17 00:00:00 2001 From: jhz <jinghz@oceic.com> Date: 星期二, 02 八月 2022 14:14:53 +0800 Subject: [PATCH] 丸井客户标签调整 --- SCM/Gy_BarCodeBill_Cus.cs | 84 +++++++++++++++++++++++++++++++++++------ 1 files changed, 71 insertions(+), 13 deletions(-) diff --git a/SCM/Gy_BarCodeBill_Cus.cs b/SCM/Gy_BarCodeBill_Cus.cs index 0def462..ca177a5 100644 --- a/SCM/Gy_BarCodeBill_Cus.cs +++ b/SCM/Gy_BarCodeBill_Cus.cs @@ -23,7 +23,7 @@ public const Int16 HMainIDCol = 2; public const Int16 HSubIDCol = 3; public const Int16 HBillNoCol = 4; - public const Int16 HBillTypeCol = 5; + public const Int16 HMaterIDCol = 5; public const Int16 HCusModelCol = 6; public const Int16 HCusModelNameCol = 7; public const Int16 HCode1Col = 8; @@ -40,11 +40,14 @@ public const Int16 HDateCol = 19; public const Int16 HinitQtyCol = 20; public const Int16 HRemarkCol = 21; + public const Int16 HBillTypeCol = 22; + public const Int16 HLSSnoCol = 23; + public const Int16 HBoxNoCol = 24; public Int16 HSelectCol = 0; public Int16 HSno2Col = 1; public Int16 HTMCol = 2; - public Int16 HBarCodeType2Col = 3; + public Int16 HMaterID2Col = 3; public Int16 HCusModel2Col = 4; public Int16 HCusModelName2Col = 5; public Int16 HCode1_SecCol = 6; @@ -62,6 +65,9 @@ public Int16 HBeginDate2Col = 18; public Int16 HEndDate2Col = 19; public Int16 HRemark2Col = 20; + public Int16 HBarCodeType2Col = 21; + public Int16 HLSSno2Col = 22; + public Int16 HBoxNo2Col = 23; // public string ModName = "85"; public string ModCaption = "鏉$爜鐢熸垚"; @@ -459,7 +465,7 @@ bool b = false; for (int i = 0; i < grdMain.RowCount; i++) { - if (!IsNullRow(i)) + if (DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HCusModelCol].Value) !="") { b = true; break; @@ -610,7 +616,9 @@ sDay = sDay.Substring(sDay.Length - 2, 2); //================================== - //鏉$爜鍓嶇紑 = 闆朵欢鍙�17 + 鎵╁睍浣�1 2 + 渚涘簲鍟嗙紪鐮�7 + 鎵╁睍浣�2 3+ 浜х嚎1 + 骞�00 + 鏈�00 + 鏃�00 + 鎵╁睍浣�3 4 + 杩芥函鏍囪瘑 + //鏉$爜鍓嶇紑 = 闆朵欢鍙�17 + 鎵╁睍浣�1 2 + 渚涘簲鍟嗙紪鐮�7 + 鎵╁睍浣�2 3+ 浜х嚎1 + 骞�00 + 鏈�00 + 鏃�00 + 鎵╁睍浣�3 4 + 杩芥函鏍囪瘑 + sCusModel = (sCusModel + "*****************").Substring(0, 17); + sSupNumber = (sSupNumber + "*******").Substring(0, 7); sTMNumber = sCusModel + sCode1 + sSupNumber + sCode2 + sLineNumber + sYear + sPeriod + sDay ; sTMNumber_b = sCode3 + sBackDataFlag; Ds = oWeb.getDataSetBySQL("exec h_p_WMS_GetMaxNo_Cus '" + sTMNumber + sTMNumber_b + "'", "h_p_WMS_GetMaxNo_Cus", ref DBUtility.ClsPub.sExeReturnInfo);//鑾峰彇鏈�澶ф祦姘村彿 @@ -668,7 +676,9 @@ return; } grdSub.Rows[i].Cells[HTMCol].Value = TM; - grdSub.Rows[i].Cells[HQty2Col].Value = HMinQty; + grdSub.Rows[i].Cells[HQty2Col].Value = HMinQty; + grdSub.Rows[i].Cells[HMaterID2Col].Value = grdMain.Rows[j].Cells[HMaterIDCol].Value; + grdSub.Rows[i].Cells[HLSSno2Col].Value = LSH2; grdSub.Rows[i].Cells[HCusModel2Col].Value = grdMain.Rows[j].Cells[HCusModelCol].Value; grdSub.Rows[i].Cells[HCusModelName2Col].Value = grdMain.Rows[j].Cells[HCusModelNameCol].Value; grdSub.Rows[i].Cells[HCode1_SecCol].Value = grdMain.Rows[j].Cells[HCode1Col].Value; @@ -752,6 +762,7 @@ string HBackDataFlag = ""; string HCusModelName = ""; string HSupName = ""; + string HLSSNO = ""; long HCustomQty1 = 0; string[] sSQLMul = new string[grdSub.Rows.Count]; @@ -765,6 +776,8 @@ Application.DoEvents(); if (ClsPub.isStrNull(grdSub.Rows[i].Cells[HCusModel2Col].Value) != "") { + HLSSNO = ClsPub.isStrNull(grdSub.Rows[i].Cells[HLSSno2Col].Value); + HMaterID = ClsPub.isLong(grdSub.Rows[i].Cells[HMaterID2Col].Value); HCusModel = ClsPub.isStrNull(grdSub.Rows[i].Cells[HCusModel2Col].Value); HCusModelName = ClsPub.isStrNull(grdSub.Rows[i].Cells[HCusModelName2Col].Value); HWorkLineName = ClsPub.isStrNull(grdSub.Rows[i].Cells[HWorkLineName2Col].Value); @@ -790,12 +803,12 @@ sSQLMul[mm] = "insert into Gy_BarCodeBill_Cus (HBarCode,HBarCodeType,HCusModel,HWorkLineName,HQty" + ",HCode1,HSupNumber,HCode2,HMaker,HMakeDate,HPrintQty" + ",HBarCodeDate,HCode3,HBackDataFlag,HRemark " + - ",HInterID,HCusModelName,HSupName " + + ",HInterID,HCusModelName,HSupName,HMaterID,HSNO " + ") values (" + "'" + HBarCode + "','" + HBarCodeType + "','" + HCusModel.ToString() + "','" + HWorkLineName.ToString() + "'," + HQty2.ToString() + ",'" + HCode1 + "','" + HSupNumber.ToString() + "','" + HCode2.ToString() + "','" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + ", '" + HBarCodeDate.ToString() + "','" + HCode3.ToString() + "','" + HBackDataFlag + "', '" + HRemark + "'" - + "," + HInterID.ToString() + " ,'" + HCusModelName + "'" + " ,'" + HSupName + "'" + ")"; + + "," + HInterID.ToString() + " ,'" + HCusModelName + "'" + " ,'" + HSupName + "'" + "," + HMaterID.ToString() + ",'" + HLSSNO + "')"; //oCn.RunProc("exec setLSH '" + ClsPub.GetServerDate(0) + "'"); mm = mm + 1; Application.DoEvents(); @@ -860,7 +873,7 @@ { grdMain.RowCount = 0; grdSub.RowCount = 0; - grdMain.ColumnCount = 22; //鎬诲垪鏁� + grdMain.ColumnCount = 25; //鎬诲垪鏁� ClsPub1.initGridFst(grdMain, this.Name); grdMain.Columns[HSnoCol].HeaderText = "搴忓彿"; grdMain.Columns[HMainIDCol].HeaderText = "婧愬崟涓籌D"; @@ -882,6 +895,9 @@ grdMain.Columns[HRemarkCol].HeaderText = "澶囨敞"; grdMain.Columns[HCusModelCol].HeaderText = "瀹㈡埛闆朵欢鍙�"; grdMain.Columns[HCusModelNameCol].HeaderText = "瀹㈡埛闆朵欢鍚嶇О"; + grdMain.Columns[HMaterIDCol].HeaderText = "鐗╂枡浠g爜"; + grdMain.Columns[HLSSnoCol].HeaderText = "娴佹按鍙�"; + grdMain.Columns[HBoxNoCol].HeaderText = "绠卞彿"; //// //鏍煎紡鍖� 闅愯棌鍒� grdMain.Columns[HTagCol].Visible = false; @@ -901,6 +917,7 @@ string sAllowCol; sAllowCol = HQtyCol.ToString() + "," + HCusModelCol.ToString() + + "," + HMaterIDCol.ToString() + "," + HCusModelNameCol.ToString() + "," + HWorkLineNameCol.ToString() + "," + HSupNumberCol.ToString() + @@ -918,7 +935,7 @@ ClsPub1.initGridLast(sAllowCol, sTotalCol, oSumGrid); //---------------------------- - grdSub.ColumnCount = 21; //鎬诲垪鏁� + grdSub.ColumnCount = 25; //鎬诲垪鏁� ClsPub1.initGridFst(grdSub, this.Name); grdSub.Columns[HSelectCol].HeaderText = "閫夋嫨"; grdSub.Columns[HCusModel2Col].HeaderText = "瀹㈡埛闆朵欢鍙�"; @@ -942,6 +959,9 @@ grdSub.Columns[HEndDate2Col].HeaderText = "璁″垝瀹屽伐鏃ユ湡"; grdSub.Columns[HCusModel2Col].HeaderText = "瀹㈡埛鍨嬪彿"; grdSub.Columns[HCusModelName2Col].HeaderText = "瀹㈡埛鍨嬪彿鍚嶇О"; + grdSub.Columns[HMaterID2Col].HeaderText = "鐗╂枡浠g爜"; + grdSub.Columns[HLSSno2Col].HeaderText = "娴佹按鍙�"; + grdSub.Columns[HBoxNo2Col].HeaderText = "绠卞彿"; //鏍煎紡鍖� 闅愯棌鍒� grdSub.Columns[HBarCodeType2Col].Visible = false; @@ -974,7 +994,7 @@ // return; //} // - DSet = oWeb.getDataSetBySQL("select * from h_v_IF_BarCodeBill_CusList Where HinterID=" + HInterID.ToString() + " order by HItemID", "h_v_IF_BarCodeBill_CusList", ref DBUtility.ClsPub.sExeReturnInfo); + DSet = oWeb.getDataSetBySQL("exec h_p_IF_BarCodeBill_CusList " + HInterID.ToString() + " ", "h_p_IF_BarCodeBill_CusList", ref DBUtility.ClsPub.sExeReturnInfo); //鐢熸垚棣栬鏍囬 if (DSet == null) { @@ -1090,7 +1110,7 @@ //鏄惁鏄┖琛� private bool IsNullRow(int Row) { - return DBUtility.Xt_BaseBillFun.IsNullRow(Row, HCusModelCol,grdMain); + return DBUtility.Xt_BaseBillFun.IsNullRow(Row, HCusModelCol ,grdMain); } //'鍒ゆ柇缃戞牸琛岀殑褰曞叆鏄惁姝g‘ private bool CheckGridRow(int Row) @@ -1127,6 +1147,7 @@ } SCM.ClsIF_Supplier_View oSup = new SCM.ClsIF_Supplier_View(); //渚涘簲鍟� + SCM.ClsIF_Material_View oMater = new SCM.ClsIF_Material_View(); // if (!grdStatus) { @@ -1141,8 +1162,45 @@ { - case HSupNumberCol: - + case HMaterIDCol: + oMater.WherePart = ""; + sWhere = " and HUSEORGID = " + sHOrgID; + if (oMater.RefreshViewForBig(sWhere)) + { + grdMain.Rows[sRow].Cells[HMaterIDCol].Value = oMater.omodel.HItemID.ToString(); + grdMain.Rows[sRow].Cells[HMinQtyCol].Value = 1; + grdMain.Rows[sRow].Cells[HCusModelNameCol].Value = oMater.omodel.HName.ToString(); + grdMain.Rows[sRow].Cells[HCode1Col].Value = "00"; + grdMain.Rows[sRow].Cells[HCode2Col].Value ="000"; + grdMain.Rows[sRow].Cells[HCode3Col].Value = "0000"; + grdMain.Rows[sRow].Cells[HSupNumberCol].Value = "VG509"; + grdMain.Rows[sRow].Cells[HWorkLineNameCol].Value = "1"; + grdMain.Rows[sRow].Cells[HBarCodeDateCol].Value = dtpHDate.Value.ToShortDateString(); + grdMain.Rows[sRow].Cells[HBackDataFlagCol].Value = "%"; + oEdit.Text = oMater.omodel.HItemID.ToString(); + } + else + { + grdMain.Rows[sRow].Cells[HMaterIDCol].Value = 0; + grdMain.Rows[sRow].Cells[HMinQtyCol].Value = 0; + } + //if (CampanyName == "鍥涚淮灏�") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� + //{ + sHMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[sRow].Cells[HMaterIDCol].Value); + //鑾峰彇鍝佺暘 + oDs2 = oWeb.getDataSetBySQL("exec h_p_HMaterPinfan " + sHMaterID, "h_p_HMaterPinfan", ref DBUtility.ClsPub.sExeReturnInfo); + // + if (oDs2 != null && oDs2.Tables[0].Rows.Count > 0) + { + grdMain.Rows[sRow].Cells[HCusModelCol].Value = DBUtility.ClsPub.isStrNull(oDs2.Tables[0].Rows[0]["HPinfan"]); + + } + else + { + grdMain.Rows[sRow].Cells[HCusModelCol].Value = ""; + + } + //} break; //case HDateCol: -- Gitblit v1.9.1