您好,用下面脚本即可实现您需求,我这边已经本地测试过,确实可行的:
- (function(){
- var doc = getCurrentDocument();
- var formid ="11de-a1ce-12978c3f-a188-7710f5ef0f5e";
- var application = getApplication();
- var docid =doc.getId();
- var url = getContextPath() + "/portalnaform/document/newWithPermission.action?_formid="+formid+"&_isJump=1&application="+application+"&budget="+docid;
- var phoneurl = url;
- var user = getWebUser();
- if(user.getEquipment()==1){
- var rnt = "<a style='background-color:#ff8400;border:0px;color:white;height: 31px;width: 100px' onMouseOver="this.style.backgroundColor='blue';this.style.cursor='hand';this.style.color='#fff';" onMouseOut="this.style.backgroundColor='#ff8400';this.style.color='#fff';" onclick="event.stopPropagation();ajaxPage.useFormActionNoOtherParams('"+url+"');;">跳转到加班表单</a>";
- }
- else{
- println("url-->" + url);
- var rnt = "<a style='background-color:#ff8400;border:0px;color:white;height: 31px;width: 100px' onMouseOver="this.style.backgroundColor='blue';this.style.cursor='hand';this.style.color='#fff';" onMouseOut="this.style.backgroundColor='#ff8400';this.style.color='#fff';" onclick="event.stopPropagation();OBPM.dialog.show({width:1200,height:500,url:'" + url + "',title:'跳转到加班表单',maximization:false,maximized:true,position:'center'});;">跳转到加班表单</a>";
- println("pc---------======-->" );
- }
- return rnt;
- })();
复制代码 |