泛微E9 OA Ecode开发流程表单右上角增加自定义按钮
·
实现效果如下,在OA流程表单的提交节点的提交按钮后,增加一个自定义的按钮,实现过程超级简单。

以下是ecode代码。添加后发布即可。
const toNewPage = ()=>{
window.open('https://www.baidu.com');
}
ecodeSDK.overwritePropsFnQueueMapSet('WeaReqTop',{
fn:(newProps,name)=>{
const { hash } = window.location;
if (!hash.startsWith('#/main/workflow/req')) return;
const baseInfo = WfForm.getBaseInfo();
var userId = window.WfForm.getGlobalStore().commonParam.f_weaver_belongto_userid;
if (baseInfo.workflowid !== 498) return;
const {Button} = antd;
newProps.buttons.push(
<span>
<Button type="primary" onClick={()=>{
toNewPage();
}}>自定义按钮</Button>
</span>
);
},
order: 1,
desc: '泛微OA流程右上角通过Ecode代码增加自定义按钮'
});
如果想在泛微E9OA的流程表单中增加自定义按钮的话可以参考我的另外一篇文章。
更多推荐



所有评论(0)