| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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 = "条码生成"; |
| | |
| | | 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; |
| | |
| | | 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);//获取最大流水号 |
| | |
| | | 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; |
| | |
| | | string HBackDataFlag = ""; |
| | | string HCusModelName = ""; |
| | | string HSupName = ""; |
| | | string HLSSNO = ""; |
| | | long HCustomQty1 = 0; |
| | | |
| | | string[] sSQLMul = new string[grdSub.Rows.Count]; |
| | |
| | | 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); |
| | |
| | | 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(); |
| | |
| | | { |
| | | 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 = "源单主ID"; |
| | |
| | | grdMain.Columns[HRemarkCol].HeaderText = "备注"; |
| | | grdMain.Columns[HCusModelCol].HeaderText = "客户零件号"; |
| | | grdMain.Columns[HCusModelNameCol].HeaderText = "客户零件名称"; |
| | | grdMain.Columns[HMaterIDCol].HeaderText = "物料代码"; |
| | | grdMain.Columns[HLSSnoCol].HeaderText = "流水号"; |
| | | grdMain.Columns[HBoxNoCol].HeaderText = "箱号"; |
| | | //// |
| | | //格式化 隐藏列 |
| | | grdMain.Columns[HTagCol].Visible = false; |
| | |
| | | string sAllowCol; |
| | | sAllowCol = HQtyCol.ToString() + |
| | | "," + HCusModelCol.ToString() + |
| | | "," + HMaterIDCol.ToString() + |
| | | "," + HCusModelNameCol.ToString() + |
| | | "," + HWorkLineNameCol.ToString() + |
| | | "," + HSupNumberCol.ToString() + |
| | |
| | | ClsPub1.initGridLast(sAllowCol, sTotalCol, oSumGrid); |
| | | //---------------------------- |
| | | |
| | | grdSub.ColumnCount = 21; //总列数 |
| | | grdSub.ColumnCount = 25; //总列数 |
| | | ClsPub1.initGridFst(grdSub, this.Name); |
| | | grdSub.Columns[HSelectCol].HeaderText = "选择"; |
| | | grdSub.Columns[HCusModel2Col].HeaderText = "客户零件号"; |
| | |
| | | grdSub.Columns[HEndDate2Col].HeaderText = "计划完工日期"; |
| | | grdSub.Columns[HCusModel2Col].HeaderText = "客户型号"; |
| | | grdSub.Columns[HCusModelName2Col].HeaderText = "客户型号名称"; |
| | | grdSub.Columns[HMaterID2Col].HeaderText = "物料代码"; |
| | | grdSub.Columns[HLSSno2Col].HeaderText = "流水号"; |
| | | grdSub.Columns[HBoxNo2Col].HeaderText = "箱号"; |
| | | |
| | | //格式化 隐藏列 |
| | | grdSub.Columns[HBarCodeType2Col].Visible = false; |
| | |
| | | // 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) |
| | | { |
| | |
| | | //是否是空行 |
| | | private bool IsNullRow(int Row) |
| | | { |
| | | return DBUtility.Xt_BaseBillFun.IsNullRow(Row, HCusModelCol,grdMain); |
| | | return DBUtility.Xt_BaseBillFun.IsNullRow(Row, HCusModelCol ,grdMain); |
| | | } |
| | | //'判断网格行的录入是否正确 |
| | | private bool CheckGridRow(int Row) |
| | |
| | | } |
| | | |
| | | SCM.ClsIF_Supplier_View oSup = new SCM.ClsIF_Supplier_View(); //供应商 |
| | | SCM.ClsIF_Material_View oMater = new SCM.ClsIF_Material_View(); // |
| | | |
| | | if (!grdStatus) |
| | | { |
| | |
| | | { |
| | | |
| | | |
| | | 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: |