电脑桌面
添加蚂蚁七词文库到电脑桌面
安装后可以在桌面快捷访问

文件服务.二开案例. 弹窗展示自定义过滤条件的附件列表

来源:金蝶云社区作者:金蝶2024-09-2315

文件服务.二开案例. 弹窗展示自定义过滤条件的附件列表

1、背景介绍:

    附件操作分单据头的附件操作以及单据体的附件操作,用于查看单据关联的附件列表,如下图所示,此为单据头附件菜单关联的附件列表:

 

    此为单据体分录关联的附件列表,需留意单据体菜单绑定的附件操作为单据体附件管理


    系统标准的附件操作只能看到当前单据的附件,但是如果用户希望可以自定义过滤条件,看到其他单据的附件数据,或者希望同时看到单据头跟单据体的附件数据该怎么做呢?可通过二开插件弹窗,自定义过滤条件实现。

 

2、案例演示:

    本案例将演示采购订单点击菜单打开附件列表,同时展示单据头单据体附件,最终效果如下图:

 

3、实现步骤:

1)设计器添加菜单:

 

2)编写插件,示例代码如下:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using Kingdee.BOS.Core;
using Kingdee.BOS.Core.Attachment;
using Kingdee.BOS.Core.Bill.PlugIn;
using Kingdee.BOS.Core.DynamicForm;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.Core.List;
using Kingdee.BOS.Core.Metadata.FieldElement;
using Kingdee.BOS.Util;
 
namespace Running.Sample.PlugIn.BusinessPlugIn.Bill
{
    [Description("弹窗展示自定义过滤条件的附件列表"), HotUpdate]
    public class P20201112ShowAttachmentsEdit : AbstractBillPlugIn
    {
        public override void BarItemClick(BarItemClickEventArgs e)
        {
            if (e.BarItemKey.EqualsIgnoreCase("tbBtnShowAttachments"))
            {
                ShowAttachments();
            }
        }
 
        private void ShowAttachments()
        {
            AttachmentKey attaKey = new AttachmentKey
            {
                OperationStatus = this.View.OpenParameter.Status, //附件列表操作状态。
                BillType = this.View.BusinessInfo.GetForm().Id, //单据业务对象标识。
                BillInterID = this.View.Model.GetPKValue().GetString(), //单据内码。
                EntryKey = " ", //单据体标识。
                EntryInterID = "-1", //单据体内码。
                RowIndex = 0 //行下标

文件服务.二开案例. 弹窗展示自定义过滤条件的附件列表

1、背景介绍: 附件操作分单据头的附件操作以及单据体的附件操作,用于查看单据关联的附件列表,如下图所示,此为单据头附件菜单关联的...
点击下载文档文档为doc格式

声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

已经是第一篇
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息
QQ群
  • 答案:my7c点击这里加入QQ群
支持邮箱
微信
  • 微信