| | |
| | | public Int64 HInterID = 0; //å
ç |
| | | public Int64 HOrgID = -1; |
| | | public string HOrgNumber = ""; |
| | | public string ERPMode = ""; //ERP模å¼ï¼WISEãCLOUDï¼ |
| | | public string CampanyName = ""; //客æ·å®å¶ååç§° |
| | | public string SourceQtyCtl = ""; //è¶
æºåæ°éæ§å¶ |
| | | //------------------------------------------------------------------------- |
| | |
| | | } |
| | | else |
| | | { |
| | | ERPMode = oSystemParameter.omodel.WMS_WMSStockCtl_ERPMode; |
| | | CampanyName = oSystemParameter.omodel.WMS_CampanyName; |
| | | SourceQtyCtl = oSystemParameter.omodel.BarCode_SourceQtyCtl; |
| | | } |
| | |
| | | grdSub.RowCount = 0; |
| | | grdMain.ColumnCount = 60; //æ»åæ° |
| | | DBUtility.Xt_BaseBillFun.initGridFst(grdMain, this.Name); |
| | | grdMain.Columns[HSnoCol].HeaderText = "åºå·"; |
| | | grdMain.Columns[HMainIDCol].HeaderText = "æºå主ID"; |
| | | grdMain.Columns[HSubIDCol].HeaderText = "æºååID"; |
| | | grdMain.Columns[HBillNoCol].HeaderText = "æºååå·"; |
| | |
| | | grdMain.Columns[HInnerBillNoCol].HeaderText = "å
é¨éè´è®¢åå·"; |
| | | grdMain.Columns[HMakerCol].HeaderText = "å¶å人"; |
| | | //// |
| | | grdMain.Columns[HSnoCol].HeaderText = "åºå·"; |
| | | //æ ¼å¼å |
| | | grdMain.Columns[HTagCol].Visible = false; //éèå |
| | | grdMain.Columns[HMainIDCol].Visible = false; |
| | |
| | | grdMain.Columns[HModelCol].Visible = false; |
| | | //grdMain.Columns[HBatchNoCol].Visible = false; |
| | | grdMain.Columns[HAuxPropIDCol].Visible = false; |
| | | grdMain.Columns[HAuxPropNumberCol].Visible = false; |
| | | grdMain.Columns[HAuxPropNameCol].Visible = false; |
| | | //grdMain.Columns[HAuxPropNumberCol].Visible = false; |
| | | //grdMain.Columns[HAuxPropNameCol].Visible = false; |
| | | grdMain.Columns[HUnitIDCol].Visible = false; |
| | | grdMain.Columns[HinitQtyCol].Visible = false; |
| | | grdMain.Columns[HSupIDCol].Visible = false; |
| | |
| | | grdSub.Columns[HMaterID2Col].Visible = false; |
| | | grdSub.Columns[HModel2Col].Visible = false; |
| | | grdSub.Columns[HAuxPropID2Col].Visible = false; |
| | | grdSub.Columns[HAuxPropNumber2Col].Visible = false; |
| | | grdSub.Columns[HAuxPropName2Col].Visible = false; |
| | | //grdSub.Columns[HAuxPropNumber2Col].Visible = false; |
| | | //grdSub.Columns[HAuxPropName2Col].Visible = false; |
| | | grdSub.Columns[HUnitID2Col].Visible = false; |
| | | grdSub.Columns[HPrintCol].Visible = false; |
| | | grdSub.Columns[HSourceInterID2Col].Visible = false; |
| | |
| | | } |
| | | DAL.ClsIF_Material_View oMater = new DAL.ClsIF_Material_View();//ç©æ |
| | | DAL.ClsIF_Unit_View oUnit = new DAL.ClsIF_Unit_View();//计éåä½ |
| | | DAL.ClsIF_Property_View oProperty = new DAL.ClsIF_Property_View();//è¾
å©å±æ§ |
| | | if (!grdStatus) |
| | | { |
| | | return; |
| | |
| | | grdMain.Rows[sRow].Cells[HMinQtyCol].Value = oMater.omodel.HQtyMin; |
| | | grdMain.Rows[sRow].Cells[HDateCol].Value = dtpHDate.Value.ToShortDateString(); |
| | | grdMain.Rows[sRow].Cells[HShowDateCol].Value = dtpHDate.Value.ToShortDateString(); |
| | | grdMain.Rows[sRow].Cells[HAuxPropIDCol].Value = 0; |
| | | grdMain.Rows[sRow].Cells[HAuxPropNumberCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HAuxPropNameCol].Value = ""; |
| | | if (oUnit.GetInfoByID(oMater.omodel.HUnitID)) |
| | | { |
| | | grdMain.Rows[sRow].Cells[HUnitIDCol].Value = oUnit.omodel.HItemID.ToString(); |
| | |
| | | grdMain.Rows[sRow].Cells[HUnitIDCol].Value = 0; |
| | | grdMain.Rows[sRow].Cells[HUnitNumberCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HUnitNameCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HAuxPropIDCol].Value = 0; |
| | | grdMain.Rows[sRow].Cells[HAuxPropNumberCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HAuxPropNameCol].Value = ""; |
| | | } |
| | | } |
| | | else |
| | |
| | | grdMain.Rows[sRow].Cells[HMaterModelCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HMinQtyCol].Value = 0; |
| | | grdMain.Rows[sRow].Cells[HUnitIDCol].Value = 0; |
| | | grdMain.Rows[sRow].Cells[HUnitNumberCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HUnitNameCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HAuxPropIDCol].Value = 0; |
| | | grdMain.Rows[sRow].Cells[HAuxPropNumberCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HAuxPropNameCol].Value = ""; |
| | | } |
| | | break; |
| | | |
| | |
| | | case HDateCol: |
| | | BLL.ClsPub_BLL.Sub_SelectDate(grdMain, sRow, HDateCol); |
| | | oEdit.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[sRow].Cells[HDateCol].Value); |
| | | break; |
| | | |
| | | case HAuxPropNumberCol: |
| | | oProperty.WherePart = ""; |
| | | if (ERPMode == "CLOUD") |
| | | { |
| | | sWhere = " and HMaterNumber = '" + DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.CurrentCell.RowIndex].Cells[HMaterNumberCol].Value) + "'"; |
| | | } |
| | | else |
| | | { |
| | | sWhere = ""; |
| | | } |
| | | if (oProperty.RefreshView(sWhere)) |
| | | { |
| | | grdMain.Rows[sRow].Cells[HAuxPropIDCol].Value = oProperty.oModel.HItemID.ToString(); |
| | | grdMain.Rows[sRow].Cells[HAuxPropNumberCol].Value = oProperty.oModel.HNumber; |
| | | grdMain.Rows[sRow].Cells[HAuxPropNameCol].Value = oProperty.oModel.HName; |
| | | oEdit.Text = oProperty.oModel.HNumber; |
| | | } |
| | | else |
| | | { |
| | | grdMain.Rows[sRow].Cells[HAuxPropIDCol].Value = 0; |
| | | grdMain.Rows[sRow].Cells[HAuxPropNumberCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HAuxPropNameCol].Value = ""; |
| | | } |
| | | break; |
| | | |
| | | |
| | |
| | | //grdMain.Rows[i].Cells[HSourceNumberCol].Value = oTable.Rows[0]["ç产线代ç "].ToString(); |
| | | grdMain.Rows[i].Cells[HSourceNameCol].Value = oTable.Rows[0]["ç产线"].ToString(); |
| | | grdMain.Rows[i].Cells[HEndDateCol].Value = oTable.Rows[0]["计åå®å·¥æ¥æ"].ToString(); |
| | | grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["æå°å
è£
æ°"].ToString(); |
| | | grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["æå°å
è£
æ°"].ToString(); |
| | | //-- |
| | | //设置å¯ç¼è¾å |
| | | string sAllowCol = HQtyCol.ToString() + |
| | | "," + HMinQtyCol.ToString() + |
| | | "," + HAuxPropNumberCol.ToString() + |
| | | "," + HBatchNoCol.ToString() + |
| | | "," + HRemarkCol.ToString() + |
| | | "," + HMinQtyCol.ToString(); |
| | | "," + HRemarkCol.ToString(); |
| | | grdMain.Columns[HBillNoCol].ReadOnly = true; |
| | | //设置å计å |
| | | string sTotalCol = HQtyCol.ToString(); |
| | |
| | | //-- |
| | | //设置å¯ç¼è¾å |
| | | string sAllowCol = HQtyCol.ToString() + |
| | | "," + HMinQtyCol.ToString() + |
| | | "," + HAuxPropNumberCol.ToString() + |
| | | "," + HBatchNoCol.ToString() + |
| | | "," + HRemarkCol.ToString() + |
| | | "," + HMinQtyCol.ToString(); |
| | | "," + HRemarkCol.ToString(); |
| | | grdMain.Columns[HBillNoCol].ReadOnly = true; |
| | | //设置å计å |
| | | string sTotalCol = HQtyCol.ToString(); |