/// <summary> /// 出库单据查询 /// </summary> protected override void QueryOut() { this.ShowSelectData(); Neusoft.HISFC.BizLogic.Material.Store itemManager = new Neusoft.HISFC.BizLogic.Material.Store(); //重新写了查找单据的方法 增加了通过物资项目查询 //List<Neusoft.HISFC.Models.Material.Output> alList = itemManager.QueryOutputList(this.DeptInfo.ID, "AA", this.State, this.BeginDate, this.EndDate); List <Neusoft.HISFC.Models.Material.Output> alList = itemManager.QueryOutputList(this.DeptInfo.ID, "AA", this.State, this.BeginDate, this.EndDate, itemID, this.deptCode); if (alList == null) { MessageBox.Show("查询单据列表发生错误" + itemManager.Err); } this.neuSpread1_Sheet1.Rows.Count = 0; foreach (Neusoft.HISFC.Models.Material.Output info in alList) { this.neuSpread1_Sheet1.Rows.Add(0, 1); this.neuSpread1_Sheet1.Cells[0, (int)ColumnSet.ColList].Text = info.OutListNO; this.neuSpread1_Sheet1.Cells[0, 1].Text = info.StoreBase.StockDept.Name; this.neuSpread1_Sheet1.Cells[0, 2].Text = info.StoreBase.StockDept.ID; this.neuSpread1_Sheet1.Cells[0, (int)ColumnSet.ColTargetName].Text = info.StoreBase.TargetDept.Name; this.neuSpread1_Sheet1.Cells[0, (int)ColumnSet.ColTargetID].Text = info.StoreBase.TargetDept.ID; } }
/// <summary> /// 入库单据查询 /// </summary> protected override void QueryIn() { Neusoft.HISFC.BizLogic.Material.Store itemManager = new Neusoft.HISFC.BizLogic.Material.Store(); //重新写了查找单据的方法 增加了通过物资项目查询 //ArrayList alList = itemManager.QueryInputList(this.DeptInfo.ID, "AA", this.State, this.BeginDate, this.EndDate); ArrayList alList = itemManager.QueryInputList(this.DeptInfo.ID, "AA", this.State, this.BeginDate, this.EndDate, this.itemID); if (alList == null) { MessageBox.Show("查询单据列表发生错误" + itemManager.Err); } this.neuSpread1_Sheet1.Rows.Count = 0; foreach (Neusoft.HISFC.Models.Material.Input info in alList) { if (this.MarkPrivType != null) { if (this.MarkPrivType.ContainsKey(info.StoreBase.PrivType)) //对于过滤的权限不显示 { continue; } } this.neuSpread1_Sheet1.Rows.Add(0, 1); this.neuSpread1_Sheet1.Cells[0, 0].Text = info.InListNO; this.neuSpread1_Sheet1.Cells[0, 2].Text = this.inTypeHelper.GetName(info.StoreBase.PrivType); if (this.DeptInfo.Memo == "L") //仓库 获取供货公司 { #region 获取供货公司 Neusoft.HISFC.Models.Material.MaterialCompany company = new Neusoft.HISFC.Models.Material.MaterialCompany(); if (info.StoreBase.Company.ID != "None") { Neusoft.HISFC.BizLogic.Material.ComCompany constant = new Neusoft.HISFC.BizLogic.Material.ComCompany(); company = constant.QueryCompanyByCompanyID(info.StoreBase.Company.ID, "A", "1"); if (company == null) { MessageBox.Show(constant.Err); return; } } else { company.ID = "None"; company.Name = "无供货公司"; } this.neuSpread1_Sheet1.Cells[0, 3].Text = company.Name; this.neuSpread1_Sheet1.Cells[0, 4].Text = company.ID; #endregion } } }
/// <summary> /// 入库申请单据列表 /// </summary> /// <param name="privDept">权限科室</param> public void ShowApplyList(Neusoft.FrameWork.Models.NeuObject privDept, DateTime dateBegin, DateTime dateEnd) { this.Nodes.Clear(); Neusoft.HISFC.BizLogic.Material.Store storeManager = new Neusoft.HISFC.BizLogic.Material.Store(); ArrayList alList = storeManager.QueryApplySimpleForPlan(privDept.ID, dateBegin, dateEnd); if (alList == null) { System.Windows.Forms.MessageBox.Show("获取申请单列表发生错误" + storeManager.Err); return; } if (alList.Count == 0) { this.Nodes.Add(new System.Windows.Forms.TreeNode("没有入库申请单", 0, 0)); } else { System.Windows.Forms.TreeNode parentNode = new System.Windows.Forms.TreeNode("申请单列表", 0, 0); this.Nodes.Add(parentNode); System.Windows.Forms.TreeNode node; string temp = ""; foreach (Neusoft.FrameWork.Models.NeuObject info in alList) { node = new System.Windows.Forms.TreeNode(); node.Text = info.ID + " 【" + info.Name + " 申请单】"; node.ImageIndex = 0; node.Tag = info; if (temp != info.ID) { parentNode.Nodes.Add(node); } temp = info.ID; } this.Nodes[0].ExpandAll(); this.SelectedNode = this.Nodes[0]; } }
/// <summary> /// 确认参数设置 日消耗处理 /// </summary> public int Save() { if (this.SaveValid()) { Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm("正在按照日消耗进行检索 请稍候..."); Application.DoEvents(); Neusoft.HISFC.BizLogic.Material.Store storeManager = new Neusoft.HISFC.BizLogic.Material.Store(); this.alInfo = storeManager.FindByAlter("1", this.deptCode, this.DtBegin, this.DtEnd, this.MaxAlterDays, this.MinAlterDays); if (this.alInfo == null) { Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm(); MessageBox.Show("按日消耗查找项目失败!"); return(-1); } Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm(); } else { return(-1); } return(1); }