30、列表插件,联查,单据原创
12人赞赏了该文章
6,759次浏览
编辑于2020年07月09日 16:36:09
业务场景:例如打开某个报表,点按钮,联查到对应的单据
1、打开VS,新建一个类库,具体可以参考21.1 ,1-5步
2、添加按钮,请参考 21.1,第2步
3、
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Kingdee.BOS; using Kingdee.BOS.Core; using System.ComponentModel; using Kingdee.BOS.Core.List.PlugIn; using Kingdee.BOS.Core.List; using Kingdee.BOS.Core.Metadata; using Kingdee.BOS.Core.Bill; using Kingdee.BOS.Core.DynamicForm; namespace Kingdee.Bos.Project.ListView { [Description("联查,单据")] [Kingdee.BOS.Util.HotUpdate] public class ClassName:AbstractListPlugIn { //点击按钮 public override void BarItemClick(BOS.Core.DynamicForm.PlugIn.Args.BarItemClickEventArgs e) { base.BarItemClick(e); //点击按钮,弹窗 if(e.BarItemKey.Equals("YDIE_tbTest")) { //判断单据列表,选择哪一行 ListSelectedRowCollection selectRows = this.ListView.SelectedRowsInfo; //把获取的主键KEY赋值给ID string[] ID = selectRows.GetPrimaryKeyValues(); //定义弹窗界面 BillShowParameter para = new BillShowParameter(); para.OpenStyle.ShowType = ShowType.Modal;//显示样式 para.FormId = "SAL_OUTSTOCK";//销售出库单 para.Status = OperationStatus.VIEW; //查看显示 para.PKey = ID[0];//内码 para.ParentPageId = this.View.ParentFormView.PageId; this.View.ShowForm(para); } } } }
4、最终效果,打开销售出库单列表,点按钮,弹出单据查看界面;
总目录链接
https://vip.kingdee.com/article/64993872014591232
30.zip(15.48KB)
推荐阅读