📄 addmanualnode.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GBK"
pageEncoding="GBK"%>
<%@include file="/common/taglibs.jsp"%>
<%
String contextPath = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>{*[Add a manual node]*}</title>
<!--<link href="<%=contextPath%>/css/css.jsp" rel="stylesheet"
type="text/css">-->
<link rel="stylesheet"
href="<c:out value='${pageContext.request.contextPath}'/>/resource/css/main.css"
type="text/css">
<script src="<%=contextPath%>/script/util.js"></script>
<script src="<%=contextPath%>/script/select.js"></script>
<script language="JavaScript">
var contextPath = '<%=contextPath%>';
var list = new Array();
var oldAttr = window.dialogArguments;
function ev_ok() {
//{*[Save]*}NodeActivity
oldAttr.removeAllSubElement();
for(var i=0;i<list.length;i++){
oldAttr.addNodeActivity(list[i].name);
}
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;
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.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;
if(tmp.issplit.value == 'true'){
actorAttr.issplit = true;
}else{
actorAttr.issplit = false;
}
if(tmp.isgather.value == 'true'){
actorAttr.isgather = true;
}else{
actorAttr.isgather = false;
}
if(actorAttr.isgather == true && actorAttr.exceedaction == "3"){
alert("{*[Auto-Return is not allowed for gather 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 ev_close() {
window.close();
}
function editFieldPerm(){
if(tmp.formname.value == ''){
alert("{*[Please select ]*}Form!");
return;
}
var url = "editFieldPerm.jsp?formname="+tmp.formname.value;
url = addParam(url, 's_module', "<ww:property value='#parameters.s_module'/>");
var obj = new Object();
obj.fieldPermList= tmp.fieldpermlist.value;
obj.formname = tmp.formname.value;
var fieldpermlist=window.showModalDialog(url,obj,"dialogHeight: 550px; dialogWidth: 750px; 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 = '';
//去掉重复
var array = new Array(rtn.length);
var count = 0;
for (var n = 0; n < rtn.length; n++) {
//alert("rtn->" + rtn[n]);
var flag = false;
for (var m = 0; m < rtn.length; m++) {
if (array[m] != rtn[n]) {
if (m + 1 == rtn.length) {
flag = true;
}
continue;
}
else {
break;
}
}
if (flag) {
array[count] = rtn[n];
//alert("array->" + array[count]);
count++;
}
}
// 数组复制
var newArray = array.slice(0 , count);
for (var i=0; i < newArray.length; i++) {
var t = newArray[i].split(';');
//alert(t);
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 changeCondition(){
tmp.namelist.value = '';
}
function selectForm(){
wx = '600px';
wy = '500px';
var url = contextPath + "/core/dynaform/form/select.action";
url = addParam(url, 'formtype', '1');
url = addParam(url, 's_module', "<ww:property value='#parameters.s_module'/>");
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 == '2'){//显示“{*[auto return to specific node]*}”“{*[Select]*}节点”层
div2.style.display = 'none';
var exceedaction = eval("tmp.exceedaction");
for(var i=0; i< exceedaction.length; i++){
if(exceedaction[i].checked && exceedaction[i].value == '4'){
div2.style.display = '';
}
}
}
if(n == '3'){//{*[Dispay "remind policy" "reach after" or "in advance" how many hours layer]*}
if(tmp.remaindertype.value == '0'){
div3.style.display = 'none';
}else{
div3.style.display = '';
}
}
}
</script>
</head>
<body onload="ev_init()">
<table width="98%">
<tr>
<td width="10" class="image-label"><img
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -