H5端工作流审批显示审批路线二开示例
H5端在工作流审批界面显示审批路线二开示例。这样显示是会影响任务审批界面的加载速度,如果对效率无过高要求,可参考如下步骤实现。
先在BOS设计器中对元数据WF_AssignmentApproval(工作流审批界面元数据)进行扩展。
然后在对应的位置加上一个面板,面板标识为:F_PAEZ_Panel 截图如下:
然后加上表单插件,插件代码如下:
using Kingdee.BOS.Authentication; using Kingdee.BOS.Core; using Kingdee.BOS.Core.DynamicForm; using Kingdee.BOS.Core.DynamicForm.PlugIn; using Kingdee.BOS.Workflow.Model; using Kingdee.BOS.Workflow.Models.EnumStatus; using Kingdee.BOS.Workflow.ServiceHelper; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Kingdee.BOS.Printing.PlugIn.Test { public class H5ShowChartFlowWay : AbstractDynamicFormPlugIn { public H5ShowChartFlowWay() { } public override void AfterBindData(EventArgs e) { base.AfterBindData(e); ShowChartFlowWay(); } void ShowChartFlowWay() { var _currentAssignId = GetParameterAssignId(this.View); ApprovalItemStatus _assignStatus = GetParameterItemStatus(this.View); string procInstId = AssignmentServiceHelper.GetPrcInstByAssignId(this.View.Context, _currentAssignId, _assignStatus); DynamicFormShowParameter param = new DynamicFormShowParameter(); param.PageId = Guid.NewGuid().ToString(); param.FormId = WFDynamicFormConst.ChartFlowWay; param.CustomParams.Add("procInstId", procInstId); param.CustomParams.Add("hideMenu", true.ToString()); // 菜单隐藏 param.OpenStyle.TagetKey = "F_PAEZ_Panel"; param.OpenStyle.ShowType = ShowType.InContainer; this.View.ShowForm(param); } string GetParameterAssignId(IDynamicFormView view) { string result = Convert.ToString(view.OpenParameter.GetCustomParameter("AssignId")); if (string.IsNullOrWhiteSpace(result)) { StartAppHomePageArgs homePageArgs = view.OpenParameter.GetCustomParameter(FormConst.StartAppArgs) as StartAppHomePageArgs; if (homePageArgs != null) { result = homePageArgs.PkId; } } return result; } ApprovalItemStatus GetParameterItemStatus(IDynamicFormView view) { ApprovalItemStatus result = ApprovalItemStatus.UnCompleted; string itemStatus = Convert.ToString(view.OpenParameter.GetCustomParameter("Status")); if (!string.IsNullOrWhiteSpace(itemStatus)) { result = ((ApprovalItemStatus)Enum.Parse(typeof(ApprovalItemStatus), itemStatus)); } return result; } } }
最终实现的效果如下所示:
H5端工作流审批显示审批路线二开示例
H5端在工作流审批界面显示审批路线二开示例。这样显示是会影响任务审批界面的加载速度,如果对效率无过高要求,可参考如下步骤实现。先在BO...
点击下载文档
本文2024-09-23 04:19:18发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-164559.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章