单据表体弹出物料附件列表二开示例
单据表体弹出物料附件列表,以采购申请单为例。在BOS设计器中打开采购申请单,明细信息增加菜单“查看物料附件”。
在采购申请单的表单插件中挂上插件,插件代码示例如下:
using Kingdee.BOS.Core; using Kingdee.BOS.Core.Attachment; using Kingdee.BOS.Core.Bill.PlugIn; using Kingdee.BOS.Core.DynamicForm; using Kingdee.BOS.Core.List; using Kingdee.BOS.Orm.DataEntity; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Kingdee.BOS.Printing.PlugIn.Test { public class ShowAttachmentPlugIn : AbstractBillPlugIn { public override void EntryBarItemClick(Core.DynamicForm.PlugIn.Args.BarItemClickEventArgs e) { base.EntryBarItemClick(e); if (e.BarItemKey == "PAEZ_tbButton") { int rowIndex = this.View.Model.GetEntryCurrentRowIndex("FEntity"); object entryPkValue = this.View.Model.GetEntryPKValue("FEntity", rowIndex); object obj = this.View.Model.GetValue("FMaterialId", rowIndex); if (obj is DynamicObject) { ShowAttachmentList(Convert.ToString((obj as DynamicObject) ["Id"])); } } } private void ShowAttachmentList(string interId) { AttachmentKey attachmentKey = new AttachmentKey() { BillType = "BD_MATERIAL", BillNo = "", BillInterID = interId, EntryKey = " ", EntryInterID = "-1", OperationStatus = Core.Metadata.OperationStatus.EDIT }; ListShowParameter listpara = new ListShowParameter(); listpara.IsLookUp = false; listpara.CustomParams.Add(KeyConst.AttachmentKey, AttachmentKey.ConvertToString(attachmentKey)); listpara.OpenStyle.ShowType = ShowType.Default; listpara.Caption = Kingdee.BOS.Resource.ResManager.LoadKDString("附件管理", "002012030003226", Resource.SubSystemType.BOS); listpara.FormId = FormIdConst.BOS_Attachment; listpara.MultiSelect = true; //设置是否多选。 listpara.PageId = string.Format("{0}_{1}_F7", this.View.PageId, listpara.FormId); listpara.Width = 800; listpara.Height = 500; string filter = string.Format(@"FBILLTYPE='{0}' and FINTERID in ('{1}')",attachmentKey.BillType, attachmentKey.BillInterID); listpara.ListFilterParameter.Filter = filter; listpara.IsShowQuickFilter = false; this.View.ShowForm(listpara); } } }
执行效果如下所示:
单据表体弹出物料附件列表二开示例
单据表体弹出物料附件列表,以采购申请单为例。在BOS设计器中打开采购申请单,明细信息增加菜单“查看物料附件”。在采购申请单的表单插件...
点击下载文档
本文2024-09-23 04:18:20发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-164455.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章