| | |
| | | public const Int16 HJiaYeLXCol = 71; |
| | | public const Int16 HJiaYeLCol = 72; |
| | | public const Int16 POOrderBillNoCol = 73; |
| | | public const Int16 HBarCode_PackCol = 74; |
| | | public const Int16 HCustomQty1Col = 75; |
| | | |
| | | public Int16 HSelectCol = 0; |
| | | public Int16 HSno2Col = 1; |
| | |
| | | public Int16 HJiaYeLX2Col = 69; |
| | | public Int16 HJiaYeL2Col = 70; |
| | | public Int16 POOrderBillNo2Col = 71; |
| | | public Int16 HBarCode_Pack2Col = 72; |
| | | public Int16 HCustomQty12Col = 73; |
| | | // |
| | | public string ModName = "85"; |
| | | public string ModCaption = "æ¡ç çæ"; |
| | |
| | | ////è¡¨ä½æ¸
空 |
| | | //grdMain.Rows.Clear(); |
| | | //grdSub.Rows.Clear(); |
| | | txtHGroupID.Text = ""; |
| | | txtHCaseNo.Text = ""; |
| | | cmbHBarCodeType.Items.Clear(); |
| | | cmbSourceBillType.Items.Clear(); |
| | | |
| | |
| | | cmbHBarCodeType.SelectedIndex = 0; |
| | | } |
| | | // |
| | | cmbSourceBillType.Items.Add("ç产订å"); |
| | | cmbSourceBillType.Items.Add("éè´è®¢å"); |
| | | cmbSourceBillType.Items.Add("æ¶æéç¥å"); |
| | | cmbSourceBillType.Items.Add("å§å¤è®¢å"); |
| | | cmbSourceBillType.SelectedIndex = 0; |
| | | if (CampanyName == "森楷") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | { |
| | | cmbSourceBillType.Items.Add("å
¥åºç³è¯·å"); |
| | | cmbSourceBillType.SelectedIndex = 0; |
| | | label6.Visible = true; |
| | | txtHGroupID.Visible = true; |
| | | cmdHGroupID.Visible = true; |
| | | label5.Visible = true; |
| | | txtHCaseNo.Visible = true; |
| | | chkAddModel.Visible = false; |
| | | spRow.Visible = false; |
| | | toolStripSeparator6.Visible = false; |
| | | } |
| | | else |
| | | { |
| | | cmbSourceBillType.Items.Add("ç产订å"); |
| | | cmbSourceBillType.Items.Add("çäº§æ±æ¥å"); |
| | | cmbSourceBillType.Items.Add("éè´è®¢å"); |
| | | cmbSourceBillType.Items.Add("æ¶æéç¥å"); |
| | | cmbSourceBillType.Items.Add("å§å¤è®¢å"); |
| | | cmbSourceBillType.SelectedIndex = 0; |
| | | } |
| | | // |
| | | //DBUtility.Xt_BaseBillFun.Sub_ClearBill(gbUp); |
| | | |
| | |
| | | } |
| | | |
| | | } |
| | | if (CampanyName == "森楷") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | { |
| | | if (ClsPub.isInt(txtHCaseNo.Text) <= 0) |
| | | { |
| | | MessageBox.Show(" ç®±å·å¿
é¡»ä¸ºå¤§äº 0 çæ´æ°ï¼"); |
| | | return false; |
| | | } |
| | | else if(ClsPub.isInt(txtHCaseNo.Text) <= ClsPub.isInt(txtHCaseNo.Tag)) |
| | | { |
| | | MessageBox.Show(" æè¾å
¥ç®±å·å¿
须大äºå·²çæè¿ç®±å·æ°ï¼" + txtHCaseNo.Tag.ToString() + "ï¼"); |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | |
| | | { |
| | | return false; |
| | | } |
| | | SaveBarCode(); |
| | | bc.Enabled = false; |
| | | SaveBarCode(); |
| | | return true; |
| | | } |
| | | |
| | |
| | | Ds = oWeb.getDataSetBySQL("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo", ref DBUtility.ClsPub.sExeReturnInfo);//è·åæå¤§æµæ°´å· |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | } |
| | | else if (CampanyName == "å£é¾") |
| | | { |
| | | LSHlen = 3; //æµæ°´å·é¿åº¦ |
| | | HNumber = grdMain.Rows[j].Cells[HMaterNumberCol].Value.ToString(); |
| | | sSeOrderNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HBillNoCol].Value); // ç产订åå· |
| | | if (DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HBillTypeCol].Value).ToString() != "3710") |
| | | { |
| | | MessageBox.Show("å¯ä¸æ¡ç å¿
é¡»ä¸ºææºåæ¡ç ï¼ä¸æºåç±»å为ç产订åï¼è¯·ç¡®è®¤æºåä¿¡æ¯æ¯å¦æ£ç¡®ï¼"); |
| | | return; |
| | | } |
| | | //æ¡ç åç¼ = ç产订å + ç©æä»£ç + æ¹æ¬¡ |
| | | sTMNumber = sSeOrderNo + ";" + HNumber + ";" + HBatchNo; |
| | | Ds = oWeb.getDataSetBySQL("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo", ref DBUtility.ClsPub.sExeReturnInfo);//è·åæå¤§æµæ°´å· |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | } |
| | | else //éç¨æ¹æ³ |
| | | { |
| | | //æ¡ç åç¼ = ç»ç»ä»£ç + ç©æå
ç + å¹´ + æ + æ¥ |
| | |
| | | { |
| | | if (CampanyName == "å£é¾") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | { |
| | | //éè´è®¢åå·ä¸ºç©ºï¼ååæºååå· |
| | | string sPOOrderBillNo = ""; |
| | | sPOOrderBillNo = grdMain.Rows[j].Cells[POOrderBillNoCol].Value.ToString(); |
| | | if (DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[POOrderBillNoCol].Value).ToString() == "") |
| | | { |
| | | sPOOrderBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HBillNoCol].Value).ToString(); |
| | | } |
| | | else |
| | | { |
| | | sPOOrderBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[POOrderBillNoCol].Value).ToString(); |
| | | } |
| | | HNumber = grdMain.Rows[j].Cells[HMaterNumberCol].Value.ToString(); |
| | | |
| | | //ç»ç»ä»£ç ï¼éè´è®¢åå·ï¼ç©æä»£ç ï¼æ¹æ¬¡ |
| | | TM = HOrgNumber + ";" + sPOOrderBillNo + ";" + HNumber + ";" + HBatchNo; |
| | | //æ¡ç ç¼å· = éè´è®¢åå·ï¼ç©æä»£ç ï¼æ¹æ¬¡ï¼æ°é |
| | | sTMNumber = sPOOrderBillNo + ";" + HNumber + ";" + HBatchNo; |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | LSH2 = "0" + LSH2; |
| | | } |
| | | if (cmbHBarCodeType.Text == "å¯ä¸æ¡ç " || cmbHBarCodeType.Text == "奥å
æ¯æ¡ç " || cmbHBarCodeType.Text == "ç®±åæ¡ç ") |
| | | |
| | | if (CampanyName == "å£é¾") |
| | | { |
| | | if (cmbHBarCodeType.Text == "å¯ä¸æ¡ç ") |
| | | { |
| | | //æ¡ç ç¼å· = ç产订åï¼ç©æä»£ç ï¼æ¹æ¬¡ï¼æå·ï¼æ°é |
| | | TM = sTMNumber + ";" + LSH2 + ";" + HMinQty; |
| | | } |
| | | else if (cmbHBarCodeType.Text == "æ¹æ¬¡æ¡ç ") |
| | | { |
| | | //æ¡ç ç¼å· = éè´è®¢åå·ï¼ç©æä»£ç ï¼æ¹æ¬¡ï¼æ°é |
| | | TM = sTMNumber + ";" + HMinQty; |
| | | } |
| | | } |
| | | else if (cmbHBarCodeType.Text == "å¯ä¸æ¡ç " || cmbHBarCodeType.Text == "奥å
æ¯æ¡ç " || cmbHBarCodeType.Text == "ç®±åæ¡ç ") |
| | | { |
| | | //æ¡ç ç¼å· = æ¡ç åç¼ + æµæ°´å· |
| | | TM = sTMNumber + LSH2; |
| | |
| | | grdSub.Rows[i].Cells[HJiaYeLX2Col].Value = grdMain.Rows[j].Cells[HJiaYeLXCol].Value; |
| | | grdSub.Rows[i].Cells[HJiaYeL2Col].Value = grdMain.Rows[j].Cells[HJiaYeLCol].Value; |
| | | grdSub.Rows[i].Cells[POOrderBillNo2Col].Value = grdMain.Rows[j].Cells[POOrderBillNoCol].Value; |
| | | grdSub.Rows[i].Cells[HBarCode_Pack2Col].Value = grdMain.Rows[j].Cells[HBarCode_PackCol].Value; |
| | | grdSub.Rows[i].Cells[HCustomQty12Col].Value = ClsPub.isLong(txtHCaseNo.Text) + i; |
| | | k = k + 1; |
| | | n = n + 1; |
| | | //oWeb.getRunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | |
| | | // |
| | | } |
| | | } |
| | | if (CampanyName == "森楷") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | { |
| | | string sHGroupID = ""; //çç» |
| | | string sHBatchNo = ""; //æ¹æ¬¡ |
| | | string HDate = ""; //æ¥æ |
| | | string sCaseNoNumber = ""; //ç®±å·åç¼ |
| | | int sCaseNo = 0; //ç®±å· |
| | | string sMaterNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HMaterNumberCol].Value); |
| | | string sAuxItemName = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HAuxPropNameCol].Value); |
| | | sHGroupID = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HGroupIDCol].Value); |
| | | sHBatchNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HBatchNoCol].Value); |
| | | HDate = SetDateStr(dtpHDate.Value ); |
| | | sCaseNo = ClsPub.isInt(txtHCaseNo.Text) + grdSub.Rows.Count - 1; |
| | | |
| | | //ç®±å·åç¼ = çç»ID + æ¹æ¬¡ + æ¥æ + ç©æä»£ç + è¾
å©å±æ§ |
| | | sCaseNoNumber = sHGroupID + sHBatchNo + HDate + sMaterNumber + sAuxItemName; |
| | | oWeb.getRunProc("Exec h_p_WMS_SetBarCodeNoByEmp '" + sCaseNoNumber + "'," + sCaseNo, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | |
| | | string HWei = ""; //å°¾æ° |
| | | string HBarCode = ""; |
| | | string HBarCode_Pack = ""; |
| | | string HBarCodeType = ""; |
| | | Int64 HMaterID = 0; |
| | | Int64 HAuxPropID = 0; |
| | |
| | | string HCustomBatchNo = ""; |
| | | string HGBBarCode = ""; |
| | | string POOrderBillNo = ""; |
| | | long HCustomQty1 = 0; |
| | | |
| | | string[] sSQLMul = new string[grdSub.Rows.Count]; |
| | | |
| | |
| | | HCustomBatchNo = ClsPub.isStrNull(grdSub.Rows[i].Cells[HCustomBatchNo2Col].Value); |
| | | HGBBarCode = ClsPub.isStrNull(grdSub.Rows[i].Cells[HGBBarCode2Col].Value); |
| | | POOrderBillNo = ClsPub.isStrNull(grdSub.Rows[i].Cells[POOrderBillNo2Col].Value); |
| | | HBarCode_Pack = ClsPub.isStrNull(grdSub.Rows[i].Cells[HBarCode_Pack2Col].Value); |
| | | HCustomQty1 = ClsPub.isLong(grdSub.Rows[i].Cells[HCustomQty12Col].Value); |
| | | sSQLMul[mm] = "insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " + |
| | |
| | | ",HPressModel,HCusModel,HMaterialModel,HColor,HBarCodeDate " + |
| | | ",HLogo,HPackageSize,HMaterialJQty,HMaterialMQty,HCustomBatchNo " + |
| | | ",HSTOCKORGID,HOWNERID,HBeginDate,HSeOrderBillNo,HGBBarCode " + |
| | | ",POOrderBillNo,HInterID " + |
| | | ",POOrderBillNo,HInterID,HInitSourceEntryID,HBarCode_Pack " + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo " + |
| | | ",HCustomQty1 " + |
| | | ") values (" |
| | | + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() |
| | | + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString() |
| | |
| | | + ",'" + HPressModel + "','" + HCusModel + "','" + HMaterialModel + "','" + HColor + "','" + sDate + "'" |
| | | + ",'" + HLogo + "','" + HPackageSize + "'," + HMaterialJQty.ToString() + "," + HMaterialMQty.ToString() + ",'" + HCustomBatchNo + "'" |
| | | + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HBeginDate.ToShortDateString() + "','" + HSeOrderBillNo + "','" + HGBBarCode + "'" |
| | | + ",'" + POOrderBillNo + "'," + HInterID.ToString() |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "')"; |
| | | + ",'" + POOrderBillNo + "'," + HInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HBarCode_Pack + "'" |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "'" |
| | | + ", " + HCustomQty1.ToString() + ")"; |
| | | //oCn.RunProc("exec setLSH '" + ClsPub.GetServerDate(0) + "'"); |
| | | mm = mm + 1; |
| | | Application.DoEvents(); |
| | |
| | | Application.DoEvents(); |
| | | } |
| | | } |
| | | // |
| | | |
| | | // |
| | | oWeb.Timeout = 200000; |
| | | if (oWeb.getRunProcByMul_Back(sSQLMul, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | |
| | | grdSub.RowCount = 0; |
| | | grdSub.RowCount = 20; |
| | | } |
| | | tabControl1.SelectedIndex = 1; |
| | | if (CampanyName == "森楷") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | { |
| | | oWeb.getRunProc("exec h_p_WMS_BarCodeBackToOtherInRepuest " + HInterID.ToString() + "", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | tabControl1.SelectedIndex = 2; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | #endregion |
| | | |
| | | |
| | | public string SetDateStr(DateTime sDateTime) |
| | | { |
| | | string sDate = sDateTime.ToShortDateString(); |
| | | string sYear = ClsPub.isDate(sDate).Year.ToString().Substring(2, 2); |
| | | string sPeriod = "0" + ClsPub.isDate(sDate).Month.ToString(); |
| | | sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2); |
| | | string sDay = "0" + ClsPub.isDate(sDate).Day.ToString(); |
| | | sDay = sDay.Substring(sDay.Length - 2, 2); |
| | | return sYear+ sPeriod+ sDay; |
| | | } |
| | | |
| | | #region çªä½å¤çæ¹æ³ |
| | | //åå§åGRID |
| | | private void initGrid() |
| | | { |
| | | grdMain.RowCount = 0; |
| | | grdSub.RowCount = 0; |
| | | grdMain.ColumnCount = 74; //æ»åæ° |
| | | grdMain.ColumnCount = 76; //æ»åæ° |
| | | ClsPub1.initGridFst(grdMain, this.Name); |
| | | grdMain.Columns[HSnoCol].HeaderText = "åºå·"; |
| | | grdMain.Columns[HMainIDCol].HeaderText = "æºå主ID"; |
| | |
| | | grdMain.Columns[HJiaYeLXCol].HeaderText = "å¶å·æ¶²ç±»å"; |
| | | grdMain.Columns[HJiaYeLCol].HeaderText = "å æ¶²é"; |
| | | grdMain.Columns[POOrderBillNoCol].HeaderText = "éè´è®¢åå·"; |
| | | grdMain.Columns[HBarCode_PackCol].HeaderText = "ææ¡ç ç¼å·"; |
| | | //// |
| | | //æ ¼å¼å éèå |
| | | grdMain.Columns[HTagCol].Visible = false; |
| | |
| | | grdMain.Columns[HJiaYeLXCol].Visible = false; |
| | | grdMain.Columns[HJiaYeLCol].Visible = false; |
| | | grdMain.Columns[POOrderBillNoCol].Visible = false; |
| | | grdMain.Columns[HBarCode_PackCol].Visible = false; |
| | | grdMain.Columns[HCustomQty1Col].Visible = false; |
| | | |
| | | if (CampanyName == "é©çµ") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | { |
| | |
| | | grdMain.Columns[HSupNameCol].Visible = true; |
| | | grdMain.Columns[POOrderBillNoCol].Visible = true; |
| | | } |
| | | else if (CampanyName == "森楷") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | { |
| | | grdMain.Columns[HGroupNumberCol].Visible = true; |
| | | grdMain.Columns[HGroupNameCol].Visible = true; |
| | | } |
| | | |
| | | |
| | | //设置å¯ç¼è¾å |
| | | string sAllowCol = HQtyCol.ToString() + |
| | | "," + HMinQtyCol.ToString() + |
| | | "," + HMaterNumberCol.ToString() + |
| | | "," + HMaterNameCol.ToString() + |
| | | "," + HMaterModelCol.ToString() + |
| | | "," + HPinfanCol.ToString() + |
| | | "," + HAuxPropNumberCol.ToString() + |
| | | "," + HUnitNumberCol.ToString() + |
| | | "," + HSeOrderBillNoCol.ToString() + |
| | | "," + HCusNumberCol.ToString() + |
| | | "," + HDeptNumberCol.ToString() + |
| | | "," + HGroupNameCol.ToString() + |
| | | "," + HBatchNoCol.ToString() + |
| | | "," + HSupNumberCol.ToString() + |
| | | "," + POOrderBillNoCol.ToString() + |
| | | "," + HPressModelCol.ToString() + |
| | | "," + HGBBarCodeCol.ToString() + |
| | | "," + HRemarkCol.ToString(); |
| | | "," + HMinQtyCol.ToString() + |
| | | "," + HMaterNumberCol.ToString() + |
| | | "," + HMaterNameCol.ToString() + |
| | | "," + HMaterModelCol.ToString() + |
| | | "," + HPinfanCol.ToString() + |
| | | "," + HAuxPropNumberCol.ToString() + |
| | | "," + HUnitNumberCol.ToString() + |
| | | "," + HSeOrderBillNoCol.ToString() + |
| | | "," + HCusNumberCol.ToString() + |
| | | "," + HDeptNumberCol.ToString() + |
| | | "," + HGroupNameCol.ToString() + |
| | | "," + HBatchNoCol.ToString() + |
| | | "," + HSupNumberCol.ToString() + |
| | | "," + POOrderBillNoCol.ToString() + |
| | | "," + HPressModelCol.ToString() + |
| | | "," + HGBBarCodeCol.ToString() + |
| | | "," + HRemarkCol.ToString(); |
| | | //设置å计å |
| | | string sTotalCol = HQtyCol.ToString(); |
| | | // |
| | |
| | | ClsPub1.initGridLast(sAllowCol, sTotalCol, oSumGrid); |
| | | //---------------------------- |
| | | |
| | | grdSub.ColumnCount = 72; //æ»åæ° |
| | | grdSub.ColumnCount = 74; //æ»åæ° |
| | | ClsPub1.initGridFst(grdSub, this.Name); |
| | | grdSub.Columns[HSelectCol].HeaderText = "éæ©"; |
| | | grdSub.Columns[HTMCol].HeaderText = "æ¡ç ç¼å·"; |
| | |
| | | grdSub.Columns[HJiaYeLX2Col].HeaderText = "å¶å·æ¶²ç±»å"; |
| | | grdSub.Columns[HJiaYeL2Col].HeaderText = "å æ¶²é"; |
| | | grdSub.Columns[POOrderBillNo2Col].HeaderText = "éè´è®¢åå·"; |
| | | grdSub.Columns[HBarCode_Pack2Col].HeaderText = "ææ¡ç ç¼å·"; |
| | | |
| | | //æ ¼å¼å éèå |
| | | grdSub.Columns[HBarCodeType2Col].Visible = false; |
| | |
| | | grdSub.Columns[HJiaYeLX2Col].Visible = false; |
| | | grdSub.Columns[HJiaYeL2Col].Visible = false; |
| | | grdSub.Columns[POOrderBillNo2Col].Visible = false; |
| | | grdSub.Columns[HBarCode_Pack2Col].Visible = false; |
| | | grdSub.Columns[HCustomQty12Col].Visible = false; |
| | | |
| | | if (CampanyName == "é©çµ") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | { |
| | |
| | | default: |
| | | break; |
| | | } |
| | | bc.Enabled = true; |
| | | //bc.Enabled = true; |
| | | break; |
| | | } |
| | | case 117: //F6 |
| | |
| | | FillSelectData(oIFCLD_ICMOList.oBillSelectColl); |
| | | } |
| | | } |
| | | else if (cmbSourceBillType.Text.Trim() == "çäº§æ±æ¥å") |
| | | { |
| | | sWhere = " and HOrgID =" + sHOrgID.ToString(); |
| | | SCM.Cls_S_IF_ICMOReportBillList oIF_ICMOReportBillList = new SCM.Cls_S_IF_ICMOReportBillList(); |
| | | if (oIF_ICMOReportBillList.Refresh(sWhere)) //éæ©åå |
| | | { |
| | | FillSelectData(oIF_ICMOReportBillList.oBillSelectColl); |
| | | } |
| | | } |
| | | else if (cmbSourceBillType.Text.Trim() == "æ¶æéç¥å") |
| | | { |
| | | sWhere = " and HOrgID =" + sHOrgID.ToString(); |
| | |
| | | if (oIF_EntrustOrderBillList.Refresh(sWhere)) //éæ©åå |
| | | { |
| | | FillSelectData(oIF_EntrustOrderBillList.oBillSelectColl); |
| | | } |
| | | } |
| | | else if (cmbSourceBillType.Text.Trim() == "å
¥åºç³è¯·å") |
| | | { |
| | | sWhere = " and HOrgID =" + sHOrgID.ToString(); |
| | | SCM.Cls_S_IF_StockInRequestBillList oIF_StockInRequestBillList = new SCM.Cls_S_IF_StockInRequestBillList(); |
| | | if (oIF_StockInRequestBillList.Refresh(sWhere)) //éæ©åå |
| | | { |
| | | FillSelectData(oIF_StockInRequestBillList.oBillSelectColl); |
| | | } |
| | | } |
| | | else |
| | |
| | | //åå
¥ä¿¡æ¯ |
| | | Sub_WriteInForm(Ds.Tables[0], i); |
| | | } |
| | | //çäº§æ±æ¥å |
| | | if (oSelectRow.BillType == "3711") |
| | | { |
| | | grdMain.Rows.Add(); |
| | | grdMain.Rows[i].Cells[HTagCol].Value = "*"; |
| | | //å¾å°ä¿¡æ¯ |
| | | Ds = oWeb.getDataSetBySQL("select * from h_v_IF_ICMOReportList where hmainid=" + oSelectRow.BillMainID + " and hsubid=" + oSelectRow.BillSubID, "h_v_IF_ICMOReportList", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //åå
¥ä¿¡æ¯ |
| | | Sub_WriteInForm1(Ds.Tables[0], i); |
| | | } |
| | | //æ¶æéç¥å |
| | | if (oSelectRow.BillType == "1103") |
| | | { |
| | |
| | | Ds = oWeb.getDataSetBySQL("select * from h_v_IF_EntrustOrderList where hmainid=" + oSelectRow.BillMainID + " and hsubid=" + oSelectRow.BillSubID, "h_v_IF_EntrustOrderList", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //åå
¥ä¿¡æ¯ |
| | | Sub_WriteInForm1(Ds.Tables[0], i); |
| | | } |
| | | //å
¥åºç³è¯·å |
| | | if (oSelectRow.BillType == "1241") |
| | | { |
| | | grdMain.Rows.Add(); |
| | | grdMain.Rows[i].Cells[HTagCol].Value = "*"; |
| | | //å¾å°ä¿¡æ¯ |
| | | Ds = oWeb.getDataSetBySQL("select * from h_v_IF_StockInRequestList where hmainid=" + oSelectRow.BillMainID + " and hsubid=" + oSelectRow.BillSubID, "h_v_IF_StockInRequestList", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //åå
¥ä¿¡æ¯ |
| | | Sub_WriteInForm_1241(Ds.Tables[0], i); |
| | | |
| | | if (CampanyName == "森楷") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | { |
| | | //éæºååè·åçç»ãç®±å·ä¿¡æ¯æ¾ç¤ºå¨çé¢ä¸ |
| | | SCM.ClsGy_Group_View oGroup = new SCM.ClsGy_Group_View(); |
| | | txtHGroupID.Tag = DBUtility.ClsPub.isLong(grdMain.Rows[0].Cells[HGroupIDCol].Value); |
| | | if (oGroup.GetInfoByID(DBUtility.ClsPub.isLong(grdMain.Rows[0].Cells[HGroupIDCol].Value))) |
| | | { |
| | | txtHGroupID.Text = oGroup.omodel.HName; |
| | | } |
| | | else |
| | | { |
| | | txtHGroupID.Text = ""; |
| | | } |
| | | |
| | | string HGroupID = ""; //çç» |
| | | string HBatchNo = ""; //æ¹æ¬¡ |
| | | string HDate = ""; //æ¥æ |
| | | string sCaseNoNumber = ""; //ç®±å·åç¼ |
| | | string sMaterNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HMaterNumberCol].Value); |
| | | string sAuxItemName = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HAuxPropNameCol].Value); |
| | | HGroupID = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HGroupIDCol].Value); |
| | | HBatchNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HBatchNoCol].Value); |
| | | HDate = SetDateStr(dtpHDate.Value); |
| | | |
| | | //ç®±å·åç¼ = çç»ID + æ¹æ¬¡ + æ¥æ + ç©æä»£ç + è¾
å©å±æ§ |
| | | sCaseNoNumber = HGroupID + HBatchNo + HDate + sMaterNumber + sAuxItemName; |
| | | Ds = oWeb.getDataSetBySQL("exec h_p_WMS_GetMaxNo '" + sCaseNoNumber + "'", "h_p_WMS_GetMaxNo", ref DBUtility.ClsPub.sExeReturnInfo);//è·åæå¤§æµæ°´å· |
| | | txtHCaseNo.Text = (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) + 1).ToString(); |
| | | txtHCaseNo.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]).ToString(); |
| | | } |
| | | } |
| | | //峿¶åºå |
| | | if (oSelectRow.BillType == "JSKC") |
| | |
| | | //grdMain.Rows[i].Cells[HDateCol].Value = string.Format("{0:yyyyMMdd}", ClsPub.isDate(ClsPub.GetServerDate(0))); |
| | | //-- |
| | | //设置å¯ç¼è¾å |
| | | string sAllowCol = HQtyCol.ToString() + |
| | | string sAllowCol; |
| | | if (CampanyName == "å£é¾") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | { |
| | | sAllowCol = HQtyCol.ToString() + |
| | | "," + HMaterNameCol.ToString() + |
| | | "," + HMaterModelCol.ToString() + |
| | | "," + HPinfanCol.ToString() + |
| | | "," + HSupNumberCol.ToString() + |
| | | "," + POOrderBillNoCol.ToString() + |
| | | "," + HMinQtyCol.ToString(); |
| | | } |
| | | else |
| | | { |
| | | sAllowCol = HQtyCol.ToString() + |
| | | "," + HMaterNameCol.ToString() + |
| | | "," + HMaterModelCol.ToString() + |
| | | "," + HPinfanCol.ToString() + |
| | |
| | | "," + HSupNumberCol.ToString() + |
| | | "," + POOrderBillNoCol.ToString() + |
| | | "," + HMinQtyCol.ToString(); |
| | | } |
| | | grdMain.Columns[HBillNoCol].ReadOnly = true; |
| | | //设置å计å |
| | | string sTotalCol = HQtyCol.ToString(); |
| | |
| | | } |
| | | //-- |
| | | //设置å¯ç¼è¾å |
| | | string sAllowCol = HQtyCol.ToString() + |
| | | string sAllowCol; |
| | | if (CampanyName == "å£é¾") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | { |
| | | sAllowCol = HQtyCol.ToString() + |
| | | "," + HGroupNameCol.ToString() + |
| | | "," + HMaterNameCol.ToString() + |
| | | "," + HAuxPropNumberCol.ToString() + |
| | | "," + HMaterModelCol.ToString() + |
| | | "," + HPinfanCol.ToString() + |
| | | "," + HSupNumberCol.ToString() + |
| | | "," + POOrderBillNoCol.ToString() + |
| | | "," + HPressModelCol.ToString() + |
| | | "," + HGBBarCodeCol.ToString() + |
| | | "," + HMinQtyCol.ToString(); |
| | | } |
| | | else |
| | | { |
| | | sAllowCol = HQtyCol.ToString() + |
| | | "," + HGroupNameCol.ToString() + |
| | | "," + HMaterNameCol.ToString() + |
| | | "," + HAuxPropNumberCol.ToString() + |
| | |
| | | "," + HPressModelCol.ToString() + |
| | | "," + HGBBarCodeCol.ToString() + |
| | | "," + HMinQtyCol.ToString(); |
| | | } |
| | | grdMain.Columns[HBillNoCol].ReadOnly = true; |
| | | //设置å计å |
| | | string sTotalCol = HQtyCol.ToString(); |
| | | // |
| | | ClsPub1.initGridLast(sAllowCol, sTotalCol, oSumGrid); |
| | | tabControl1.SelectedIndex = 0; |
| | | bc.Enabled = true; |
| | | // |
| | | RowCount(i, 0); |
| | | } |
| | | |
| | | //æ ¹æ®TABLEåå
¥çé¢(å
¥åºç³è¯·å) |
| | | private void Sub_WriteInForm_1241(DataTable oTable, int i) |
| | | { |
| | | ////å è½½è¡¨ä½ |
| | | grdMain.Rows[i].Cells[HTagCol].Value = "*"; |
| | | grdMain.Rows[i].Cells[HQtyCol].Value = ClsPub.isDoule(oTable.Rows[0]["æªçææ¡ç æ°é"]); |
| | | grdMain.Rows[i].Cells[HinitQtyCol].Value = ClsPub.isDoule(oTable.Rows[0]["æªçææ¡ç æ°é"]); |
| | | grdMain.Rows[i].Cells[HMinQtyCol].Value = ClsPub.isDoule(oTable.Rows[0]["æå°å
è£
æ°"]); |
| | | // |
| | | grdMain.Rows[i].Cells[HMainIDCol].Value = oTable.Rows[0]["hmainid"].ToString(); |
| | | grdMain.Rows[i].Cells[HSubIDCol].Value = oTable.Rows[0]["hsubid"].ToString(); |
| | | grdMain.Rows[i].Cells[HBillNoCol].Value = oTable.Rows[0]["åæ®å·"].ToString(); |
| | | grdMain.Rows[i].Cells[HBillTypeCol].Value = oTable.Rows[0]["HBillType"].ToString(); |
| | | grdMain.Rows[i].Cells[HDateCol].Value = oTable.Rows[0]["æ¥æ"].ToString(); |
| | | grdMain.Rows[i].Cells[HSupIDCol].Value = oTable.Rows[0]["hsupid"].ToString(); |
| | | grdMain.Rows[i].Cells[HSupNumberCol].Value = oTable.Rows[0]["ä¾åºå代ç "].ToString(); |
| | | grdMain.Rows[i].Cells[HSupNameCol].Value = oTable.Rows[0]["ä¾åºå"].ToString(); |
| | | grdMain.Rows[i].Cells[HDeptIDCol].Value = oTable.Rows[0]["HDeptID"].ToString(); |
| | | grdMain.Rows[i].Cells[HDeptNumberCol].Value = oTable.Rows[0]["é¨é¨ä»£ç "].ToString(); |
| | | grdMain.Rows[i].Cells[HDeptNameCol].Value = oTable.Rows[0]["é¨é¨"].ToString(); |
| | | grdMain.Rows[i].Cells[HMaterIDCol].Value = oTable.Rows[0]["HMaterID"].ToString(); |
| | | grdMain.Rows[i].Cells[HMaterNumberCol].Value = oTable.Rows[0]["ç©æä»£ç "].ToString(); |
| | | grdMain.Rows[i].Cells[HMaterNameCol].Value = oTable.Rows[0]["ç©æåç§°"].ToString(); |
| | | grdMain.Rows[i].Cells[HMaterModelCol].Value = oTable.Rows[0]["è§æ ¼åå·"].ToString(); |
| | | grdMain.Rows[i].Cells[HBatchNoCol].Value = oTable.Rows[0]["æ¹æ¬¡"].ToString(); |
| | | grdMain.Rows[i].Cells[HUnitIDCol].Value = oTable.Rows[0]["HUnitID"].ToString(); |
| | | grdMain.Rows[i].Cells[HUnitNumberCol].Value = oTable.Rows[0]["计éåä½ä»£ç "].ToString(); |
| | | grdMain.Rows[i].Cells[HUnitNameCol].Value = oTable.Rows[0]["计éåä½"].ToString(); |
| | | grdMain.Rows[i].Cells[HRemarkCol].Value = oTable.Rows[0]["夿³¨"].ToString(); |
| | | grdMain.Rows[i].Cells[HAuxPropIDCol].Value = oTable.Rows[0]["HAuxPropID"].ToString(); |
| | | grdMain.Rows[i].Cells[HAuxPropNumberCol].Value = oTable.Rows[0]["è¾
å©å±æ§ä»£ç "].ToString(); |
| | | grdMain.Rows[i].Cells[HAuxPropNameCol].Value = oTable.Rows[0]["è¾
å©å±æ§"].ToString(); |
| | | grdMain.Rows[i].Cells[HJiaYeCol].Value = oTable.Rows[0]["åç§"].ToString(); |
| | | grdMain.Rows[i].Cells[HModelCol].Value = oTable.Rows[0]["è§æ ¼åå·"].ToString(); |
| | | grdMain.Rows[i].Cells[HLogoCol].Value = oTable.Rows[0]["ç级"].ToString(); |
| | | grdMain.Rows[i].Cells[HPackageSizeCol].Value = oTable.Rows[0]["çæ°"].ToString(); |
| | | grdMain.Rows[i].Cells[HBarCode_PackCol].Value = oTable.Rows[0]["ç å"].ToString(); |
| | | grdMain.Rows[i].Cells[HColorCol].Value = oTable.Rows[0]["è²æ³½"].ToString(); |
| | | grdMain.Rows[i].Cells[HCusModelCol].Value = oTable.Rows[0]["管è²"].ToString(); |
| | | grdMain.Rows[i].Cells[HMQtyCol].Value = oTable.Rows[0]["æ¯é"].ToString(); |
| | | grdMain.Rows[i].Cells[HJQtyCol].Value = oTable.Rows[0]["åé"].ToString(); |
| | | grdMain.Rows[i].Cells[HPressModelCol].Value = oTable.Rows[0]["æ»å"].ToString(); |
| | | grdMain.Rows[i].Cells[HGroupIDCol].Value = oTable.Rows[0]["HGroupID"].ToString(); |
| | | grdMain.Rows[i].Cells[HGroupNumberCol].Value = oTable.Rows[0]["çç»ä»£ç "].ToString(); |
| | | grdMain.Rows[i].Cells[HGroupNameCol].Value = oTable.Rows[0]["çç»"].ToString(); |
| | | //-- |
| | | //设置å¯ç¼è¾å |
| | | string sAllowCol = HTagCol.ToString(); |
| | | grdMain.Columns[HBillNoCol].ReadOnly = true; |
| | | //设置å计å |
| | | string sTotalCol = HQtyCol.ToString(); |
| | |
| | | txtHSourceBillNo.Text = ""; |
| | | } |
| | | } |
| | | else if (cmbSourceBillType.Text.Trim() == "å
¥åºç³è¯·å") |
| | | { |
| | | SCM.Cls_S_IF_StockInRequestBillList oIF_StockInRequestBillList = new SCM.Cls_S_IF_StockInRequestBillList(); |
| | | if (oIF_StockInRequestBillList.RefreshBySourceBillNo(" Where åæ®å· like '%" + txtHSourceBillNo.Text + "' ")) //éæ©åå |
| | | { |
| | | FillSelectData(oIF_StockInRequestBillList.oBillSelectColl); |
| | | txtHSourceBillNo.Text = ""; |
| | | } |
| | | else |
| | | { |
| | | MessageBox.Show("æªæ¥è¯¢å°ä»»å¡æ°æ®ï¼è¯·ç¡®è®¤æéç»ç»ãæºåç±»å䏿ºååå·æ¯å¦æ£ç¡®ï¼"); |
| | | return; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | private void cmdHGroupID_Click(object sender, EventArgs e) |
| | | { |
| | | long sHOrgID = -1; |
| | | string sWhere = ""; |
| | | sHOrgID = oWeb.get_ORGANIZATIONSIDByName(cmbHOrgID.Text); |
| | | if (sHOrgID == -1) |
| | | { |
| | | MessageBox.Show("éæ©ç»ç»æé误ï¼"); |
| | | return; |
| | | } |
| | | |
| | | sWhere = " and HUSEORGID = " + sHOrgID; |
| | | SCM.ClsGy_Group_View oGroup = new SCM.ClsGy_Group_View(); |
| | | if (oGroup.RefreshView()) |
| | | { |
| | | txtHGroupID.Text = oGroup.oModel.HName; |
| | | txtHGroupID.Tag = oGroup.oModel.HItemID.ToString(); |
| | | |
| | | if (CampanyName == "森楷") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | { |
| | | for (int i = 0; i < grdMain.Rows.Count; i++) |
| | | { |
| | | if (ClsPub.isLong(grdMain.Rows[i].Cells[HMaterIDCol].Value) != 0) |
| | | { |
| | | grdMain.Rows[i].Cells[HGroupIDCol].Value = oGroup.oModel.HItemID.ToString(); |
| | | grdMain.Rows[i].Cells[HGroupNumberCol].Value = oGroup.oModel.HNumber; |
| | | grdMain.Rows[i].Cells[HGroupNameCol].Value = oGroup.oModel.HName; |
| | | } |
| | | } |
| | | |
| | | string HGroupID = ""; //çç» |
| | | string HBatchNo = ""; //æ¹æ¬¡ |
| | | string HDate = ""; //æ¥æ |
| | | string sCaseNoNumber = ""; //ç®±å·åç¼ |
| | | string sMaterNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HMaterNumberCol].Value); |
| | | string sAuxItemName = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HAuxPropNameCol].Value); |
| | | HGroupID = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HGroupIDCol].Value); |
| | | HBatchNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HBatchNoCol].Value); |
| | | HDate = SetDateStr(dtpHDate.Value); |
| | | |
| | | //ç®±å·åç¼ = çç»ID + æ¹æ¬¡ + æ¥æ + ç©æä»£ç +è¾
å©å±æ§ |
| | | sCaseNoNumber = HGroupID + HBatchNo + HDate + sMaterNumber + sAuxItemName; |
| | | DataSet Ds = oWeb.getDataSetBySQL("exec h_p_WMS_GetMaxNo '" + sCaseNoNumber + "'", "h_p_WMS_GetMaxNo", ref DBUtility.ClsPub.sExeReturnInfo);//è·åæå¤§æµæ°´å· |
| | | txtHCaseNo.Text = (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) + 1).ToString(); |
| | | txtHCaseNo.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]).ToString(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | txtHGroupID.Text = ""; |
| | | |
| | | if (CampanyName == "森楷") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | { |
| | | for (int i = 0; i < grdMain.Rows.Count; i++) |
| | | { |
| | | if (ClsPub.isLong(grdMain.Rows[i].Cells[HMaterIDCol].Value) != 0) |
| | | { |
| | | grdMain.Rows[i].Cells[HGroupIDCol].Value = 0; |
| | | grdMain.Rows[i].Cells[HGroupNumberCol].Value = ""; |
| | | grdMain.Rows[i].Cells[HGroupNameCol].Value = ""; |
| | | } |
| | | } |
| | | |
| | | string HGroupID = ""; //çç» |
| | | string HBatchNo = ""; //æ¹æ¬¡ |
| | | string HDate = ""; //æ¥æ |
| | | string sCaseNoNumber = ""; //ç®±å·åç¼ |
| | | |
| | | string sMaterNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HMaterNumberCol].Value); |
| | | string sAuxItemName = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HAuxPropNameCol].Value); |
| | | HGroupID = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HGroupIDCol].Value); |
| | | HBatchNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HBatchNoCol].Value); |
| | | HDate = SetDateStr(dtpHDate.Value); |
| | | |
| | | //ç®±å·åç¼ = çç»ID + æ¹æ¬¡ + æ¥æ |
| | | sCaseNoNumber = HGroupID + HBatchNo + HDate + sMaterNumber + sAuxItemName; |
| | | DataSet Ds = oWeb.getDataSetBySQL("exec h_p_WMS_GetMaxNo '" + sCaseNoNumber + "'", "h_p_WMS_GetMaxNo", ref DBUtility.ClsPub.sExeReturnInfo);//è·åæå¤§æµæ°´å· |
| | | txtHCaseNo.Text = (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) + 1).ToString(); |
| | | txtHCaseNo.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]).ToString(); |
| | | } |
| | | } |
| | | oGroup = null; |
| | | } |
| | | |
| | | private void txtHGroupID_TextChanged(object sender, EventArgs e) |
| | | { |
| | | if (txtHGroupID.Text.Trim() == "") |
| | | { |
| | | txtHGroupID.Tag = "0"; |
| | | } |
| | | } |
| | | |
| | | private void clear_Click(object sender, EventArgs e) |
| | | { |
| | | try |
| | | { |
| | | oWeb.getRunProc("exec h_p_Xt_ClearDataBaseProcess ", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | MessageBox.Show("æ¸
çæ°æ®åºå µå¡å®æï¼"); |
| | | } |
| | | catch (Exception sExeReturnInfo) |
| | | { |
| | | MessageBox.Show("æ¸
çæ°æ®åºå µå¡å¤±è´¥ï¼" + sExeReturnInfo.Message); |
| | | } |
| | | } |
| | | |
| | | private void back_Click(object sender, EventArgs e) |
| | | { |
| | | bc.Enabled = false; |
| | | } |
| | | } |
| | | } |