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

流程管理中心流程实例显示当前处理人二开示例

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

流程管理中心流程实例显示当前处理人二开示例

第一,在BOS设计器中找到WF_ProcInstBill,拓展之后新增一个文本字段,标识为F_xxx_CurrentReceiver,名称为当前处理人,可见性设置为列表默认可见,此字段用来显示,不存储数据。

第二:为WF_ProcInstBill挂上列表插件。插件代码示例如下:

using Kingdee.BOS.Core.List;
using Kingdee.BOS.Core.List.PlugIn;
using Kingdee.BOS.ServiceHelper;
using Kingdee.BOS.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kingdee.BOS.Printing.PlugIn.Test
{
    public class ProcInstCurrentReceiver : AbstractListPlugIn
    {
        bool Reload = false;
        Dictionary<string, List<string>> dict = new Dictionary<string, List<string>>();
        public override void OnInitialize(Core.DynamicForm.PlugIn.Args.InitializeEventArgs e)
        {
            base.OnInitialize(e);
            Reload = true;
            dict.Clear();
        }

        public override void FormatCellValue(Kingdee.BOS.Core.List.PlugIn.Args.FormatCellValueArgs args)
        {
               string formId = this.View.BillBusinessInfo.GetForm().Id;
                      if (formId.EqualsIgnoreCase(WFBillConst.ProcManageProcInstEndHis))
                      {return;}
            if (Reload)
            {
                var page = (this.View as IListView).CurrentPageRowsInfo;
                string[] procinstids = page.Select(p => p.PrimaryKeyValue).ToArray();
                GetReceiver(procinstids);
                Reload = false;
            }
            if (args.Header.Key.EqualsIgnoreCase("F_xxx_CurrentReceiver"))
            {
                var row = args.DataRow as Kingdee.BOS.Core.List.ListRow;
                if (row == null)
                {
                    return;
                }
                var procinstid = ObjectUtils.Object2String(row.DynamicObject["fprocinstid"]);
                args.FormateValue = dict.ContainsKey(procinstid) ? string.Join(",", dict[procinstid]) : "";
            }
            base.FormatCellValue(args);
        }
        private void GetRecei

流程管理中心流程实例显示当前处理人二开示例

第一,在BOS设计器中找到WF_ProcInstBill,拓展之后新增一个文本字段,标识为F_xxx_CurrentReceiver,名称为当前处理人,可见性设置为列表...
点击下载文档文档为doc格式

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

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