| | |
| | | using gregn6Lib; |
| | | using Pub_Class; |
| | | using System.Threading; |
| | | using System.Text.RegularExpressions; |
| | | |
| | | namespace WarM |
| | | { |
| | |
| | | public const Int16 HBarCodeTypeCol = 16; |
| | | public const Int16 HQtyCol = 17; |
| | | public const Int16 HMinQtyCol = 18; |
| | | public const Int16 HBQtyCol = 19; |
| | | public const Int16 HinitQtyCol = 20; |
| | | public const Int16 HISKFPERIODCol = 21; |
| | | public const Int16 HProduceDateCol = 22; |
| | | public const Int16 HExpiryDateCol = 23; |
| | | public const Int16 HEXPUNITCol = 24; |
| | | public const Int16 HEXPPERIODCol = 25; |
| | | public const Int16 HGiveAwayFlagCol = 26; |
| | | public const Int16 HUnitIDCol = 27; |
| | | public const Int16 HUnitNumberCol = 28; |
| | | public const Int16 HUnitNameCol = 29; |
| | | public const Int16 HWhIDCol = 30; |
| | | public const Int16 HWhNumberCol = 31; |
| | | public const Int16 HWhNameCol = 32; |
| | | public const Int16 HSPIDCol = 33; |
| | | public const Int16 HSPNumberCol = 34; |
| | | public const Int16 HSPNameCol = 35; |
| | | public const Int16 HMTONoCol = 36; |
| | | public const Int16 HRemarkCol = 37; |
| | | public const Int16 HDeptIDCol = 38; |
| | | public const Int16 HDeptNumberCol = 39; |
| | | public const Int16 HDeptNameCol = 40; |
| | | public const Int16 HSourceIDCol = 41; |
| | | public const Int16 HSourceNumberCol = 42; |
| | | public const Int16 HSourceNameCol = 43; |
| | | public const Int16 HSupIDCol = 44; |
| | | public const Int16 HSupNumberCol = 45; |
| | | public const Int16 HSupNameCol = 46; |
| | | public const Int16 HGroupIDCol = 47; |
| | | public const Int16 HGroupNumberCol = 48; |
| | | public const Int16 HGroupNameCol = 49; |
| | | public const Int16 HCusIDCol = 50; |
| | | public const Int16 HCusNumberCol = 51; |
| | | public const Int16 HCusNameCol = 52; |
| | | public const Int16 HCusTypeCol = 53; |
| | | public const Int16 HSeOrderBillNoCol = 54; |
| | | public const Int16 HSeOrderSEQCol = 55; |
| | | public const Int16 HInnerBillNoCol = 56; |
| | | public const Int16 HEndDateCol = 57; |
| | | public const Int16 HSourceBillQtyCol = 58; |
| | | public const Int16 HPinfanCol = 59; |
| | | public const Int16 HPackBarQtyCol = 19; //è§æ ¼æ°éï¼å段å
容为æå¨è¾å
¥ |
| | | public const Int16 HCoilNOCol = 20; //é¢å·å·ï¼å段å
容为æå¨è¾å
¥ |
| | | public const Int16 HFactoryCol = 21; //产å°(åå)ï¼å段å
容为æå¨è¾å
¥ |
| | | public const Int16 HJiaYeCol = 22; //åºä½å· |
| | | public const Int16 HRemarkCol = 23; |
| | | public const Int16 HBQtyCol = 24; |
| | | public const Int16 HinitQtyCol = 25; |
| | | public const Int16 HISKFPERIODCol = 26; |
| | | public const Int16 HProduceDateCol = 27; |
| | | public const Int16 HExpiryDateCol = 28; |
| | | public const Int16 HEXPUNITCol = 29; |
| | | public const Int16 HEXPPERIODCol = 30; |
| | | public const Int16 HGiveAwayFlagCol = 31; |
| | | public const Int16 HUnitIDCol = 32; |
| | | public const Int16 HUnitNumberCol = 33; |
| | | public const Int16 HUnitNameCol = 34; |
| | | public const Int16 HWhIDCol = 35; |
| | | public const Int16 HWhNumberCol = 36; |
| | | public const Int16 HWhNameCol = 37; |
| | | public const Int16 HSPIDCol = 38; |
| | | public const Int16 HSPNumberCol = 39; |
| | | public const Int16 HSPNameCol = 40; |
| | | public const Int16 HMTONoCol = 41; |
| | | public const Int16 HDeptIDCol = 42; |
| | | public const Int16 HDeptNumberCol = 43; |
| | | public const Int16 HDeptNameCol = 44; |
| | | public const Int16 HSourceIDCol = 45; |
| | | public const Int16 HSourceNumberCol = 46; |
| | | public const Int16 HSourceNameCol = 47; |
| | | public const Int16 HSupIDCol = 48; |
| | | public const Int16 HSupNumberCol = 49; |
| | | public const Int16 HSupNameCol = 50; |
| | | public const Int16 HGroupIDCol = 51; |
| | | public const Int16 HGroupNumberCol = 52; |
| | | public const Int16 HGroupNameCol = 53; |
| | | public const Int16 HCusIDCol = 54; |
| | | public const Int16 HCusNumberCol = 55; |
| | | public const Int16 HCusNameCol = 56; |
| | | public const Int16 HCusTypeCol = 57; |
| | | public const Int16 HSeOrderBillNoCol = 58; |
| | | public const Int16 HSeOrderSEQCol = 59; |
| | | public const Int16 HInnerBillNoCol = 60; |
| | | public const Int16 HEndDateCol = 61; |
| | | public const Int16 HSourceBillQtyCol = 62; |
| | | public const Int16 HPinfanCol = 63; |
| | | |
| | | // |
| | | public string ModName = "85"; |
| | |
| | | { |
| | | sHRemark = sHRemark + " 第" + ClsPub.isLong(grdMain.Rows[j].Cells[HSnoCol].Value) + "è¡ï¼ç©æï¼" + ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterNameCol].Value) + " å¯ç¨ä¿è´¨æç®¡çï¼æææè³ä¸è½ä¸ºç©ºï¼"; |
| | | } |
| | | |
| | | // æ£å表达å¼ï¼å¹é
æ´æ°ãæµ®ç¹æ°ãæ£è´å·ãç§å¦è®¡æ°æ³ï¼å¯æ ¹æ®éæ±è°æ´ï¼ |
| | | string numericRegex = @"^[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?$"; |
| | | if (!Regex.IsMatch(DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HPackBarQtyCol].Value), numericRegex) && DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HPackBarQtyCol].Value) != "") |
| | | { |
| | | sHRemark = sHRemark + " 第" + HSno + "è¡ï¼è§æ ¼æ°éä¸ä¸ºæ°åæ ¼å¼ï¼è¯·è¾å
¥æ£ç¡®çæ°å¼ï¼"; |
| | | } |
| | | } |
| | | } |
| | | if (sHRemark != "") |
| | |
| | | string HMaterModel = ""; //产åè§æ ¼åå· |
| | | string HPinfan = ""; //åçª |
| | | DateTime HEndDate; //计åå®å·¥æ¥æ |
| | | double HPackBarQty = 0; //è§æ ¼æ°é |
| | | string HCoilNO = ""; //é¢å·å· |
| | | string HFactory = ""; //产å°(åå) |
| | | string HJiaYe = ""; //åºä½å· |
| | | |
| | | oCn.BeginTran(); |
| | | Application.DoEvents(); |
| | |
| | | HMaterModel = ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterModelCol].Value); |
| | | HPinfan = ClsPub.isStrNull(grdMain.Rows[j].Cells[HPinfanCol].Value); |
| | | HEndDate = ClsPub.isDate(grdMain.Rows[j].Cells[HEndDateCol].Value); |
| | | HPackBarQty = ClsPub.isDoule(grdMain.Rows[j].Cells[HPackBarQtyCol].Value == "" ? 0 : grdMain.Rows[j].Cells[HPackBarQtyCol].Value); |
| | | HCoilNO = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCoilNOCol].Value); |
| | | HFactory = ClsPub.isStrNull(grdMain.Rows[j].Cells[HFactoryCol].Value); |
| | | HJiaYe = ClsPub.isStrNull(grdMain.Rows[j].Cells[HJiaYeCol].Value); |
| | | |
| | | oCn.RunProc("insert into Gy_BarCodeBill" + |
| | | "(HInterID,HEntryID,HBarCode,HBarCodeType,HMaterID,HUnitID" + |
| | |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HInitSourceEntryID,HRemark" + |
| | | ",HPrintQty,HSTOCKORGID,HOWNERID,HDeptID,HSupID,HGroupID" + |
| | | ",HCusID,HCusType,HSeOrderBillNo,HSeOrderSEQ,HInnerBillNo,HWorkLineName" + |
| | | ",HMaterName,HMaterModel,HPinfan,HEndDate,HMaker,HMakeDate" + |
| | | ",HMaterName,HMaterModel,HPinfan,HEndDate,HMaker,HMakeDate,HPackBarQty,HCoilNO,HFactory,HJiaYe" + |
| | | ") values (" |
| | | + " " + HInterID.ToString() + "," + HEntryID.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() |
| | | + ", " + HAuxPropID.ToString() + ",'" + HBatchNo + "','" + HMTONo + "'," + HQty.ToString() + "," + HinitQty.ToString() + "," + HSourceBillQty.ToString() |
| | |
| | | + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "'," + HInitSourceEntryID.ToString() + ",'" + HRemark + "'" |
| | | + ", " + HPrintQty.ToString() + "," + HSTOCKORGID.ToString() + "," + HOWNERID.ToString() + "," + HDeptID.ToString() + "," + HSupID.ToString() + "," + HGroupID.ToString() |
| | | + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HSeOrderBillNo + "'," + HSeOrderSEQ.ToString() + ",'" + HInnerBillNo + "','" + HWorkLineName + "'" |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "','" + HEndDate.ToShortDateString() + "','" + ClsPub.CurUserName + "',getdate()" + |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "','" + HEndDate.ToShortDateString() + "','" + ClsPub.CurUserName + "',getdate()" + "," + HPackBarQty + ",'" + HCoilNO + "','" + HFactory + "','" + HJiaYe + "'" + |
| | | ")"); |
| | | n = n + 1; |
| | | nn = nn + 1; |
| | |
| | | private void initGrid() |
| | | { |
| | | grdMain.RowCount = 0; |
| | | grdMain.ColumnCount = 60; //æ»åæ° |
| | | grdMain.ColumnCount = 64; //æ»åæ° |
| | | DBUtility.Xt_BaseBillFun.initGridFst(grdMain, this.Name); |
| | | grdMain.Columns[HSnoCol].HeaderText = "åºå·"; |
| | | grdMain.Columns[HMainIDCol].HeaderText = "æºå主ID"; |
| | |
| | | grdMain.Columns[HQtyCol].HeaderText = "æ°é"; |
| | | grdMain.Columns[HMinQtyCol].HeaderText = "æå°å
è£
æ°"; |
| | | grdMain.Columns[HBQtyCol].HeaderText = "ç®±æ°"; |
| | | grdMain.Columns[HPackBarQtyCol].HeaderText = "è§æ ¼æ°é"; |
| | | grdMain.Columns[HCoilNOCol].HeaderText = "é¢å·å·"; |
| | | grdMain.Columns[HFactoryCol].HeaderText = "产å°"; |
| | | grdMain.Columns[HJiaYeCol].HeaderText = "åºä½å·"; |
| | | grdMain.Columns[HRemarkCol].HeaderText = "夿³¨"; |
| | | grdMain.Columns[HinitQtyCol].HeaderText = "åå§åæ°é"; |
| | | grdMain.Columns[HSourceBillQtyCol].HeaderText = "æºåå¯çææ¡ç æ°é"; |
| | | grdMain.Columns[HBarCodeTypeCol].HeaderText = "æ¡ç ç±»å"; |
| | |
| | | grdMain.Columns[HSPNumberCol].HeaderText = "ä»ä½ä»£ç "; |
| | | grdMain.Columns[HSPNameCol].HeaderText = "ä»ä½"; |
| | | grdMain.Columns[HMTONoCol].HeaderText = "计åè·è¸ªå·"; |
| | | grdMain.Columns[HRemarkCol].HeaderText = "夿³¨"; |
| | | grdMain.Columns[HDeptIDCol].HeaderText = "车é´ID"; |
| | | grdMain.Columns[HDeptNumberCol].HeaderText = "车é´ä»£ç "; |
| | | grdMain.Columns[HDeptNameCol].HeaderText = "车é´"; |
| | |
| | | "," + HBatchNoCol.ToString() + |
| | | "," + HBarCodeTypeCol.ToString() + |
| | | "," + HProduceDateCol.ToString() + |
| | | "," + HPackBarQtyCol.ToString() + |
| | | "," + HCoilNOCol.ToString() + |
| | | "," + HFactoryCol.ToString() + |
| | | "," + HJiaYeCol.ToString() + |
| | | "," + HRemarkCol.ToString(); |
| | | |
| | | //设置å计å |
| | |
| | | grdMain.Rows[sRow].Cells[HISKFPERIODCol].Value = oMater.omodel.HISKFPERIOD; |
| | | grdMain.Rows[sRow].Cells[HSubjoin2Col].Value = oMater.omodel.HSubjoin2; |
| | | grdMain.Rows[sRow].Cells[HBarCodeTypeCol].Value = "å¯ä¸æ¡ç "; |
| | | grdMain.Rows[sRow].Cells[HPackBarQtyCol].Value = 0; |
| | | grdMain.Rows[sRow].Cells[HCoilNOCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HFactoryCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HJiaYeCol].Value = ""; |
| | | //å¯ç¨æ¹æ¬¡ |
| | | if (oMater.omodel.HBatchManager) |
| | | { |
| | |
| | | grdMain.Rows[sRow].Cells[HEXPPERIODCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HProduceDateCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HExpiryDateCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HPackBarQtyCol].Value = 0; |
| | | grdMain.Rows[sRow].Cells[HCoilNOCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HFactoryCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HJiaYeCol].Value = ""; |
| | | } |
| | | } |
| | | else |
| | |
| | | grdMain.Rows[sRow].Cells[HEXPPERIODCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HProduceDateCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HExpiryDateCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HPackBarQtyCol].Value = 0; |
| | | grdMain.Rows[sRow].Cells[HCoilNOCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HFactoryCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HJiaYeCol].Value = ""; |
| | | } |
| | | break; |
| | | |
| | |
| | | "," + HBatchNoCol.ToString() + |
| | | "," + HBarCodeTypeCol.ToString() + |
| | | "," + HProduceDateCol.ToString() + |
| | | "," + HPackBarQtyCol.ToString() + |
| | | "," + HCoilNOCol.ToString() + |
| | | "," + HFactoryCol.ToString() + |
| | | "," + HJiaYeCol.ToString() + |
| | | "," + HRemarkCol.ToString(); |
| | | grdMain.Columns[HBillNoCol].ReadOnly = true; |
| | | //设置å计å |
| | |
| | | grdMain.Rows[row + r].Cells[HBatchNoCol].Value = grdMain.Rows[row].Cells[HBatchNoCol].Value; |
| | | grdMain.Rows[row + r].Cells[HQtyCol].Value = DBUtility.ClsPub.isDoule(hq, 4); |
| | | grdMain.Rows[row + r].Cells[HMinQtyCol].Value = 0; |
| | | grdMain.Rows[row + r].Cells[HPackBarQtyCol].Value = 0; |
| | | grdMain.Rows[row + r].Cells[HCoilNOCol].Value = ""; |
| | | grdMain.Rows[row + r].Cells[HFactoryCol].Value = ""; |
| | | grdMain.Rows[row + r].Cells[HJiaYeCol].Value = ""; |
| | | grdMain.Rows[row + r].Cells[HSourceBillQtyCol].Value = DBUtility.ClsPub.isDoule(hq, 4); |
| | | grdMain.Rows[row + r].Cells[HProduceDateCol].Value = grdMain.Rows[row].Cells[HProduceDateCol].Value; |
| | | grdMain.Rows[row + r].Cells[HExpiryDateCol].Value = grdMain.Rows[row].Cells[HExpiryDateCol].Value; |