📄 addgroup.jsp
字号:
<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="java.util.*"%>
<%@ page import="cn.myapps.core.user.action.WebUser, cn.myapps.constans.Web"%>
<%@ page import="cn.myapps.core.dynaform.form.action.FormAction"%>
<%@ page import="cn.myapps.core.dynaform.form.ejb.FormField"%>
<%@ page import="cn.myapps.base.action.ParamsTable"%>
<%@include file="/common/taglibs.jsp"%>
<%String contextPath = request.getContextPath();%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>{*[Add role]*}</title>
<link href="<%=contextPath%>/css/css.jsp" rel="stylesheet" type="text/css">
<script src="<%=contextPath%>/script/util.js"></script>
<script src="<%=contextPath%>/script/select.js"></script>
<script language="JavaScript">
var contextPath = '<%=contextPath%>';
function ev_ok() {
if (tmp.namelist.value == ''){
alert("{*[Please choose the authorized group]*}!");
return;
}
var actorAttr = new Object();
actorAttr.name = tmp.name.value;
actorAttr.namelist = tmp.namelist.value;
actorAttr.note = tmp.note.value;
if(tmp.issetcurruser.value == 'true'){
actorAttr.issetcurruser = true;
}else{
actorAttr.issetcurruser = false;
}
if(tmp.isstartandnext != null){
// actorAttr.isstartandnext = tmp.isstartandnext.checked;
if(tmp.isstartandnext.value == 'true'){
actorAttr.isstartandnext = true;
}else{
actorAttr.isstartandnext = false;
}
}else{
actorAttr.isstartandnext = true;
}
if(tmp.isstart.value == 'true'){
actorAttr.isstart = true;
}else{
actorAttr.isstart = false;
}
if(tmp.isend.value == 'true'){
actorAttr.isend = true;
}else{
actorAttr.isend = false;
}
if(tmp.canterminate.value == 'true'){
actorAttr.canterminate = true;
}else{
actorAttr.canterminate = false;
}
if(tmp.cansuspend.value == 'true'){
actorAttr.cansuspend = true;
}else{
actorAttr.cansuspend = false;
}
if(tmp.canreject.value == 'true'){
actorAttr.canreject = true;
}else{
actorAttr.canreject = false;
}
if(tmp.canflowself.value == 'true'){
actorAttr.canflowself = true;
}else{
actorAttr.canflowself = false;
}
actorAttr.canagency = true;
actorAttr.beforescrpt = tmp.beforescrpt.value;
actorAttr.afterscrpt = tmp.afterscrpt.value;
actorAttr.beginscrpt = tmp.beginscrpt.value;
actorAttr.nextscrpt = tmp.nextscrpt.value;
actorAttr.retrievescrpt = tmp.retrievescrpt.value;
actorAttr.backscrpt = tmp.backscrpt.value;
actorAttr.suspendscrpt = tmp.suspendscrpt.value;
actorAttr.terminatescrpt = tmp.terminatescrpt.value;
actorAttr.abortscrpt = tmp.abortscrpt.value;
actorAttr.completescrpt = tmp.completescrpt.value;
actorAttr.backnodeid = tmp.backnodeid.value;
var exceedaction = eval("tmp.exceedaction");
actorAttr.exceedaction = 0;
for(var i=0; i< exceedaction.length; i++){
if(exceedaction[i].checked){
actorAttr.exceedaction = exceedaction[i].value;
break;
}
}
actorAttr.limittimecount = tmp.limittimecount.value;
// actorAttr.issplit = tmp.issplit.checked;//{*[Is Distribute Node]*}
// actorAttr.isgather = tmp.isgather.checked;//{*[Is centralized]*}节点
if(tmp.issplit.value == 'true'){
actorAttr.issplit = true;
}else{
actorAttr.issplit = false;
}
if(tmp.isgather.value == 'true'){
actorAttr.isgather = true;
}else{
actorAttr.isgather = false;
}
actorAttr.remaindertype = tmp.remaindertype.value;//{*[Remind type]*}
actorAttr.beforetime = tmp.beforetime.value;
var passcondition = eval("tmp.passcondition");//审核通过{*[Condition]*}({*[Or]*}、{*[and]*}、强制{*[and]*}、{*[User-defined]*})
actorAttr.passcondition = 0;
for(var i=0; i< passcondition.length; i++){
if(passcondition[i].checked){
actorAttr.passcondition = passcondition[i].value;
break;
}
}
actorAttr.fieldpermlist = tmp.fieldpermlist.value;
actorAttr.formname = tmp.formname.value;
actorAttr.fieldname = tmp.fieldname.value;
if(tmp.isfieldtoaudit.value == 'true'){
actorAttr.isfieldtoaudit = true;
}else{
actorAttr.isfieldtoaudit = false;
}
if(actorAttr.isstart == true && actorAttr.namelist.indexOf("*") >= 0){
alert("{*[Asterisk is not allowed for starter!]*}!");
return;
}
if(actorAttr.isstart == true && actorAttr.passcondition != '0'){
alert("{*[Only operation OR is allowed for starter]*}!");
return;
}
if(actorAttr.isstart == true && (actorAttr.exceedaction == "3" || actorAttr.exceedaction == '4')){
alert("{*[Auto-Return is not allowed for starter]*}!");
return;
}
if(actorAttr.isgather == true && actorAttr.exceedaction == "3"){
alert("{*[Auto-Return is not allowed for centralize node ]*}!");
return;
}
if(actorAttr.exceedaction == '4' && actorAttr.backnodeid == ''){
alert("{*[Please select Return To node]*}!");
return;
}
if(actorAttr.exceedaction != '0' || actorAttr.remaindertype == '2'){
if(actorAttr.limittimecount == ''){
alert("{*[Please input time limitation]*}!");
return;
}
}
if(actorAttr.limittimecount != '' && (isNaN(actorAttr.limittimecount) || actorAttr.limittimecount.indexOf(".") >=0)){
alert("{*[Time limitation must be integer]*}");
return;
}
if(actorAttr.remaindertype != '0' && (actorAttr.beforetime == '' || isNaN(actorAttr.beforetime) || actorAttr.beforetime.indexOf(".") >= 0)){
alert("{*[Remind time must be integer]*}!");
return;
}
if(actorAttr.remaindertype == '2' && (parseInt(actorAttr.beforetime) > parseInt(actorAttr.limittimecount))){
alert("{*[Remind time must larger than Time Limitation of approval!]*}!");
return;
}
window.returnValue = actorAttr;
window.close();
}
function editFieldPerm(){
if(tmp.formname.value == ''){
alert("{*[Frist please Select]*}Form!");
return;
}
var url = "editFieldPerm.jsp?formname="+tmp.formname.value;
var obj = new Object();
obj.fieldPermList= tmp.fieldpermlist.value;
obj.formname = tmp.formname.value;
var fieldpermlist=window.showModalDialog(url,obj,"dialogHeight: 550px; dialogWidth: 850px; dialogTop: 120px; dialogLeft: 120px; edge: Raised; center: Yes; help: Yes; resizable: Yes; status: no;");
if(fieldpermlist == 'undefined' || fieldpermlist == null){
}else{
tmp.fieldpermlist.value = fieldpermlist;
}
}
function selectNameList(multiselect){
var condition = getPasscondition();
if(condition != '3'){
selectOnlyCndt(condition, multiselect);
}else{
selectAllCndt();
}
}
function selectOnlyCndt(condition, multiselect) {
// var rtn = selectUser('U', multiselect);
var rtn = selectAll(tmp.namelist.value, multiselect);
if (rtn == null || rtn == 'undefined') {
}
else if (rtn == '') {
tmp.namelist.value = '';
}
else {
if(multiselect){
tmp.namelist.value = '';
for (var i=0; i < rtn.length; i++) {
var t = rtn[i].split(';');
tmp.namelist.value += t[0] + '|' + t[1] + ';';
}
}else{
var t = rtn.split(";");
tmp.namelist.value = t[0] + '*|' + t[1] + ";";
}
if(condition == '0'){
tmp.namelist.value = "(" + tmp.namelist.value + ")";
}else if(condition == '1'){
tmp.namelist.value = "{" + tmp.namelist.value + "}";
}else if(condition == '2'){
tmp.namelist.value = "{" + tmp.namelist.value + "}";
}
}
}
function getPasscondition(){
var passcondition = eval("tmp.passcondition");//审核通过{*[Condition]*}({*[Or]*}、{*[and]*}、强制{*[and]*}、{*[User-defined]*})
var condition;
for(var i=0; i< passcondition.length; i++){
if(passcondition[i].checked){
condition = passcondition[i].value;
}
}
return condition;
}
function selectAllCndt(){
wx = '500px';
wy = '400px';
var url = contextPath + '/billflow/editNameList.jsp';
var rtn = showframe('{*[Select object ]*}', url);
if ( rtn == null || rtn == 'undefined') {
}
else if (rtn == '') {
tmp.namelist.value = '';
}
else {
tmp.namelist.value = rtn;
}
}
function ggg(mm1)
{
ggg2();
mm1.style.display="";
}
function ggg2()
{
b1.style.display="none";
b2.style.display="none";
b3.style.display="none";
b4.style.display="none";
b5.style.display="none";
b6.style.display="none";
b7.style.display="none";
b8.style.display="none";
b9.style.display="none";
b10.style.display="none";
b11.style.display="none";
}
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}
function changeCondition(){
tmp.namelist.value = '';
}
function selectForm(){
wx = '600px';
wy = '500px';
var url = contextPath + "/core/dynaform/form/select.action";
//url = addParam(url, 'l_siteid', tmp.siteid.value);
//url = addParam(url, 'l_channelid', tmp.channelid.value);
url = addParam(url, 'formtype', '1');
var rtn = showframe("{*[Select]*}Form", url);
if (rtn == null || rtn == 'undefined') {
}
else if (rtn == '') {
tmp.formname.value = '';
}
else {
var t = rtn.split(',');
tmp.formname.value = t[1];
}
}
function ev_change(n){
if(n == '1'){//{*[Display "Auto send to next node when start" layer]*}
if(tmp.isstart.value=='true'){
div1.style.display = '';
}else{
div1.style.display = 'none';
}
}
if(n == '2'){//显示“{*[auto return to specific node]*}”“{*[Select]*}节点”层
div2.style.display = 'none';
var exceedaction = eval("tmp.exceedaction");
for(var i=0; i< exceedaction.length; i++){
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -