<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>流程表管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		var validateForm;
		function doSubmit(){
            $("#option1").removeAttr("disabled"); $("#option2").removeAttr("disabled"); $("#option3").removeAttr("disabled");
            $("#option4").removeAttr("disabled"); $("#option5").removeAttr("disabled"); $("#option6").removeAttr("disabled");
            $("#option7").removeAttr("disabled"); $("#option8").removeAttr("disabled"); $("#option9").removeAttr("disabled"); $("#option10").removeAttr("disabled");
		    //回调函数，在编辑和保存动作时，供openDialog调用提交表单。
			var processKey = $("#processKey").val();
            var role1 = $("#roleaId").val();var user1 = $("#useraId").val();var role2 = $("#rolebId").val();var user2 = $("#userbId").val();var role3 = $("#rolecId").val();var user3 = $("#usercId").val();var role4 = $("#roledId").val();var user4 = $("#userdId").val();var role5 = $("#roleeId").val();var user5 = $("#usereId").val();var role6 = $("#rolefId").val();var user6 = $("#userfId").val();var role7 = $("#rolegId").val();var user7 = $("#usergId").val();var role8 = $("#rolehId").val();var user8 = $("#userhId").val();var role9 = $("#roleiId").val();var user9 = $("#useriId").val();var role10 = $("#rolejId").val();var user10 = $("#userjId").val();
            var count = 0;
            var c = 0;
			if(role1 || user1){count++;}if(role2 || user2){count++;}if(role3 || user3){count++;}if(role4 || user4){count++;}if(role5 || user5){count++;}if(role6 || user6){count++;}if(role7 || user7){count++;}if(role8 || user8){count++;}if(role9 || user9){count++;}if(role10 || user10){count++;}
			if(role1 && user1){c++;}if(role2 && user2){c++;}if(role3 && user3){c++;}if(role4 && user4){c++;}if(role5 && user5){c++;}if(role6 && user6){c++;}if(role7 && user7){c++;}if(role8 && user8){c++;}if(role9 && user9){c++;}if(role10 && user10){c++;}
			if(processKey){
                if(!/^\d+$/.test(processKey)){
                    parent.layer.msg('请输入1-10之间的流程个数!',{icon:5});
                    return false;
                }else if (c != 0){
                    parent.layer.msg("同一任务执行人和执行角色不能同时存在!",{icon:5});
                    return false;
                }else if(count == 0 || processKey != count ){
                    parent.layer.msg("请输入当前执行角色或者执行人!",{icon:5});
                    return false;
                }else if(processKey != count ){
                    parent.layer.msg("请输入当前执行角色或者执行人!",{icon:5});
                    return false;
				}
			}

			if(validateForm.form()){
				$("#inputForm").submit();
				return true;
			}

			return false;


		}
		$(document).ready(function() {
            //初始化加载
            var companyId = "${companyid}";
            validateForm = $("#inputForm").validate({
                submitHandler: function(form){
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function(error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")){
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });
			$("#name").focus();
            if($("#processKey").val()){
                showlink($("#processKey").val());
            }
            if("${workActivityMenu.isExt}" == "0"){
                $("#ext").iCheck('check')
            }else{
                $("#ext1").iCheck('check')
            }

		});
		function showlink(obj) {
            var isExt = $('input[name="isExt"]:checked ').val();
            console.log("0bj="+obj);
            if(obj==1){
                $("#tr1").show();$("#tr2").hide();$("#tr3").hide();$("#tr4").hide();$("#tr5").hide();
                $("#tr6").hide();$("#tr7").hide();$("#tr8").hide(); $("#tr9").hide();$("#tr10").hide();
                $("#tr1a").show();$("#tr2a").hide();$("#tr3a").hide();$("#tr4a").hide();$("#tr5a").hide();
                $("#tr6a").hide();$("#tr7a").hide();$("#tr8a").hide(); $("#tr9a").hide();$("#tr10a").hide();
                $("#rolebName").val("");$("#rolecName").val("");$("#roledName").val("");$("#roleeName").val("");$("#rolefName").val("");$("#rolegName").val("");$("#rolehName").val("");$("#roleiName").val("");$("#rolejName").val("");
                $("#userbName").val("");$("#usercName").val("");$("#userdName").val("");$("#usereName").val("");$("#userfName").val("");$("#usergName").val("");$("#userhName").val("");$("#useriName").val("");$("#userjName").val("");
                $("#activitieName2").val("");$("#option2").val("");$("#activitieName3").val("");$("#option3").val("");$("#activitieName4").val("");$("#option4").val("");$("#activitieName5").val("");$("#option5").val("");$("#activitieName6").val("");$("#option6").val("");$("#activitieName7").val("");$("#option7").val("");$("#activitieName8").val("");$("#option8").val("");$("#activitieName9").val("");$("#option9").val("");$("#activitieName10").val("");$("#option10").val("");
            }else if (obj==2){
                $("#tr1").show();$("#tr2").show();$("#tr3").hide();$("#tr4").hide();$("#tr5").hide();
                $("#tr6").hide();$("#tr7").hide();$("#tr8").hide(); $("#tr9").hide();$("#tr10").hide();
                $("#tr1a").show();$("#tr2a").show();$("#tr3a").hide();$("#tr4a").hide();$("#tr5a").hide();
                $("#tr6a").hide();$("#tr7a").hide();$("#tr8a").hide(); $("#tr9a").hide();$("#tr10a").hide();
                $("#rolecName").val("");$("#roledName").val("");$("#roleeName").val("");$("#rolefName").val("");$("#rolegName").val("");$("#rolehName").val("");$("#roleiName").val("");$("#rolejName").val("");
                $("#usercName").val("");$("#userdName").val("");$("#usereName").val("");$("#userfName").val("");$("#usergName").val("");$("#userhName").val("");$("#useriName").val("");$("#userjName").val("");
                $("#activitieName3").val("");$("#option3").val("");$("#activitieName4").val("");$("#option4").val("");$("#activitieName5").val("");$("#option5").val("");$("#activitieName6").val("");$("#option6").val("");$("#activitieName7").val("");$("#option7").val("");$("#activitieName8").val("");$("#option8").val("");$("#activitieName9").val("");$("#option9").val("");$("#activitieName10").val("");$("#option10").val("");

            }else if (obj==3){
                $("#tr1").show();$("#tr2").show();$("#tr3").show();$("#tr4").hide();$("#tr5").hide();
                $("#tr6").hide();$("#tr7").hide();$("#tr8").hide(); $("#tr9").hide();$("#tr10").hide();
                $("#tr1a").show();$("#tr2a").show();$("#tr3a").show();$("#tr4a").hide();$("#tr5a").hide();
                $("#tr6a").hide();$("#tr7a").hide();$("#tr8a").hide(); $("#tr9a").hide();$("#tr10a").hide();
                $("#roledName").val("");$("#roleeName").val("");$("#rolefName").val("");$("#rolegName").val("");$("#rolehName").val("");$("#roleiName").val("");$("#rolejName").val("");
                $("#userdName").val("");$("#usereName").val("");$("#userfName").val("");$("#usergName").val("");$("#userhName").val("");$("#useriName").val("");$("#userjName").val("");
                $("#activitieName4").val("");$("#option4").val("");$("#activitieName5").val("");$("#option5").val("");$("#activitieName6").val("");$("#option6").val("");$("#activitieName7").val("");$("#option7").val("");$("#activitieName8").val("");$("#option8").val("");$("#activitieName9").val("");$("#option9").val("");$("#activitieName10").val("");$("#option10").val("");

            }else if (obj==4){
                $("#tr1").show();$("#tr2").show();$("#tr3").show();$("#tr4").show();$("#tr5").hide();
                $("#tr6").hide();$("#tr7").hide();$("#tr8").hide(); $("#tr9").hide();$("#tr10").hide();
                $("#tr1a").show();$("#tr2a").show();$("#tr3a").show();$("#tr4a").show();$("#tr5a").hide();
                $("#tr6a").hide();$("#tr7a").hide();$("#tr8a").hide(); $("#tr9a").hide();$("#tr10a").hide();
                $("#roleeName").val("");$("#rolefName").val("");$("#rolegName").val("");$("#rolehName").val("");$("#roleiName").val("");$("#rolejName").val("");
                $("#usereName").val("");$("#userfName").val("");$("#usergName").val("");$("#userhName").val("");$("#useriName").val("");$("#userjName").val("");
                $("#activitieName5").val(""); $("#option5").val("");$("#activitieName6").val("");$("#option6").val("");$("#activitieName7").val("");$("#option7").val("");$("#activitieName8").val("");$("#option8").val("");$("#activitieName9").val("");$("#option9").val("");$("#activitieName10").val("");$("#option10").val("");

            }else if (obj==5){
                $("#tr1").show();$("#tr2").show();$("#tr3").show();$("#tr4").show();$("#tr5").show();
                $("#tr6").hide();$("#tr7").hide();$("#tr8").hide(); $("#tr9").hide();$("#tr10").hide();
                $("#tr1a").show();$("#tr2a").show();$("#tr3a").show();$("#tr4a").show();$("#tr5a").show();
                $("#tr6a").hide();$("#tr7a").hide();$("#tr8a").hide(); $("#tr9a").hide();$("#tr10a").hide();
                $("#rolefName").val("");$("#rolegName").val("");$("#rolehName").val("");$("#roleiName").val("");$("#rolejName").val("");
                $("#userfName").val("");$("#usergName").val("");$("#userhName").val("");$("#useriName").val("");$("#userjName").val("");
                $("#activitieName6").val("");$("#option6").val("");$("#activitieName7").val("");$("#option7").val("");$("#activitieName8").val("");$("#option8").val("");$("#activitieName9").val("");$("#option9").val("");$("#activitieName10").val("");$("#option10").val("");

            }else if (obj==6){
                $("#tr1").show();$("#tr2").show();$("#tr3").show();$("#tr4").show();$("#tr5").show();
                $("#tr6").show();$("#tr7").hide();$("#tr8").hide(); $("#tr9").hide();$("#tr10").hide();
                $("#tr1a").show();$("#tr2a").show();$("#tr3a").show();$("#tr4a").show();$("#tr5a").show();
                $("#tr6a").show();$("#tr7a").hide();$("#tr8a").hide(); $("#tr9a").hide();$("#tr10a").hide();
                $("#rolegName").val("");$("#rolehName").val("");$("#roleiName").val("");$("#rolejName").val("");
                $("#usergName").val("");$("#userhName").val("");$("#useriName").val("");$("#userjName").val("");
                $("#activitieName7").val("");$("#option7").val("");$("#activitieName8").val("");$("#option8").val("");$("#activitieName9").val("");$("#option9").val("");$("#activitieName10").val("");$("#option10").val("");

            }else if (obj==7){
                $("#tr1").show();$("#tr2").show();$("#tr3").show();$("#tr4").show();$("#tr5").show();
                $("#tr6").show();$("#tr7").show();$("#tr8").hide(); $("#tr9").hide();$("#tr10").hide();
                $("#tr1a").show();$("#tr2a").show();$("#tr3a").show();$("#tr4a").show();$("#tr5a").show();
                $("#tr6a").show();$("#tr7a").show();$("#tr8a").hide(); $("#tr9a").hide();$("#tr10a").hide();
                $("#rolehName").val("");$("#roleiName").val("");$("#rolejName").val("");
                $("#userhName").val("");$("#useriName").val("");$("#userjName").val("");
                $("#activitieName8").val("");$("#option8").val("");$("#activitieName9").val("");$("#option9").val("");$("#activitieName10").val("");$("#option10").val("");

            }else if (obj==8){
                $("#tr1").show();$("#tr2").show();$("#tr3").show();$("#tr4").show();$("#tr5").show();
                $("#tr6").show();$("#tr7").show();$("#tr8").show(); $("#tr9").hide();$("#tr10").hide();
                $("#tr1a").show();$("#tr2a").show();$("#tr3a").show();$("#tr4a").show();$("#tr5a").show();
                $("#tr6a").show();$("#tr7a").show();$("#tr8a").show(); $("#tr9a").hide();$("#tr10a").hide();
                $("#roleiName").val("");$("#rolejName").val("");
                $("#useriName").val("");$("#userjName").val("");
                $("#activitieName9").val("");$("#option9").val("");$("#activitieName10").val("");$("#option10").val("");

            }else if (obj==9){
                $("#tr1").show();$("#tr2").show();$("#tr3").show();$("#tr4").show();$("#tr5").show();
                $("#tr6").show();$("#tr7").show();$("#tr8").show(); $("#tr9").show();$("#tr10").hide();
                $("#tr1a").show();$("#tr2a").show();$("#tr3a").show();$("#tr4a").show();$("#tr5a").show();
                $("#tr6a").show();$("#tr7a").show();$("#tr8a").show(); $("#tr9a").show();$("#tr10a").hide();
                $("#rolejName").val("");
                $("#userjName").val("");
                $("#activitieName10").val("");$("#option10").val("");

            }else if (obj==10){
                $("#tr1").show();$("#tr2").show();$("#tr3").show();$("#tr4").show();$("#tr5").show();
                $("#tr6").show();$("#tr7").show();$("#tr8").show(); $("#tr9").show();$("#tr10").show();
                $("#tr1a").show();$("#tr2a").show();$("#tr3a").show();$("#tr4a").show();$("#tr5a").show();
                $("#tr6a").show();$("#tr7a").show();$("#tr8a").show(); $("#tr9a").show();$("#tr10a").show();
            }else {
                parent.layer.msg('请输入1-10之间的流程个数!',{icon:2});
			}
        }

/*

        $("#workActivityMenu").blur(function(){
			var id = $("#workActivityMenu").val();
			console.log(id);
		});
*/
		function setBack(obj){
            $.ajax({
                type:'post',
                url:'${ctx}/workinvoice/workInvoice/getReturnBack',
                data:{
                    "obj":obj
                },
                success:function(data){
                    var d = JSON.parse(data);
                    //$("#dp").val(d.dp);
					if("no" == (d.dp)){
					    console.log("不能撤回");
                        $("#option1").val("0");$("#option1").attr("disabled","disabled");
                        $("#option2").val("0");$("#option2").attr("disabled","disabled");
                        $("#option3").val("0");$("#option3").attr("disabled","disabled");
                        $("#option4").val("0");$("#option4").attr("disabled","disabled");
                        $("#option5").val("0");$("#option5").attr("disabled","disabled");
                        $("#option6").val("0");$("#option6").attr("disabled","disabled");
                        $("#option7").val("0");$("#option7").attr("disabled","disabled");
                        $("#option8").val("0");$("#option8").attr("disabled","disabled");
                        $("#option9").val("0");$("#option9").attr("disabled","disabled");
                        $("#option10").val("0");$("#option10").attr("disabled","disabled");
					}else{
                        $("#option1").removeAttr("disabled");
                        $("#option2").removeAttr("disabled");
                        $("#option3").removeAttr("disabled");
                        $("#option4").removeAttr("disabled");
                        $("#option5").removeAttr("disabled");
                        $("#option6").removeAttr("disabled");
                        $("#option7").removeAttr("disabled");
                        $("#option8").removeAttr("disabled");
                        $("#option9").removeAttr("disabled");
                        $("#option10").removeAttr("disabled");
					}
                }
            })
		}
	</script>
</head>
<body class="hideScroll">
	<form:form id="inputForm" modelAttribute="workActivityMenu" action="${ctx}/workactivitymenu/workActivityMenu/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>
		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
			<tbody>
			<tr>
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>选择任务模块:</label></td>
				<td class="width-35">
					<sys:treeselectact id="workActivityMenu" name="parent.id" value="${workActivityMenu.parent.id}" labelName="parent.name" labelValue="${workActivityMenu.parent.name}"
									title="选择任务模块" url="/workactivitymenu/workActivityMenu/treeData?type=2" extId="${workActivityMenu.id}" cssClass="form-control m-s required"  allowClear="true" notAllowSelectParent="true"/></td>
				</td>
				<td class="width-15 active"><label class="pull-right"><font color="red">*</font>所属公司/部门：</label></td>
				<td class="width-25">
					<sys:treeselect id="office" name="officeId" value="${workActivityMenu.officeId}" labelName="officeName" labelValue="${workActivityMenu.officeName}"
									title="部门" url="/sys/office/treeData?type=2" cssClass="form-control required" allowClear="true"  notAllowSelectParent="false"/>

				</td>
			</tr>
			<tr>
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>模块名称:</label></td>
				<td  class="width-35" ><form:input path="name" htmlEscape="false" maxlength="50" class="form-control required"/></td>
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>功能名称</label></td>
				<td  class="width-35" ><form:input path="functionalName" htmlEscape="false" maxlength="50" class="form-control required"/></td>
			</tr>
			<tr>
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>自定义流程数</label></td>
				<td  class="width-35" ><form:input path="processKey" htmlEscape="false" maxlength="50" class="form-control number required" onChange="if(this.value)showlink(this.value);"/></td>
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>流程标识</label></td>
                    <td  class="width-35" ><form:input path="processType" htmlEscape="false" maxlength="50" class="form-control required"/></td>
			</tr>
			<tr id="tr1" hidden="hidden">
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>任务一:</label></td>
				<td  class="width-35" ><form:input path="activities[0].name" htmlEscape="false" maxlength="50" class="form-control required" id="activitieName1"/></td>
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>是否允许撤回:</label></td>
				<td  class="width-35" >
					<c:choose>
						<c:when test="${workActivityMenu.parent.id eq 'ggh3125f1f194c82bdea93555c750905'}">
							${fns:getDictLabel(workActivityMenu.activities[0].returnBack, 'activity_return_back', '')}
						</c:when>
						<c:otherwise>
							<form:select path="activities[0].returnBack" class="form-control required" id="option1">
								<form:option value="" label=""/>
								<form:options items="${fns:getDictList('activity_return_back')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</form:select>
						</c:otherwise>
					</c:choose>
				</td>
			</tr>
			<tr id="tr1a" hidden="hidden">
				<td  class="width-15 active" id="tda1"><label class="pull-right">执行角色:</label></td>
				<td  class="width-35" id="tda2">
					<sys:treeselectRole id="rolea" name="activities[0].role.enname" value="${workActivityMenu.activities[0].role.enname}" labelName="activities[0].role.name" labelValue="${workActivityMenu.activities[0].role.name}"
										title="选择角色" url="/sys/office/treeDataRoleActivityEnname?type=3&isAll=false" cssClass="form-control" allowClear="true" notAllowSelectParent="true"/>

				<%--<form:select path="activities[0].role.enname" class="form-control " id="roleast">
					</form:select>
					<input type="hidden" value="${workActivityMenu.activities[0].role.enname}" id="roleaId">--%>
				</td>
				<td  class="width-15 active" id="tda3"><label class="pull-right">执行人:</label></td>
				<td  class="width-35" id="tda4">
					<sys:treeselect id="usera" name="activities[0].user.id" value="${workActivityMenu.activities[0].user.id}" labelName="activities[0].user.name" labelValue="${workActivityMenu.activities[0].user.name}"
									title="执行人" url="/sys/office/treeDataAll?type=3" cssClass="form-control " allowClear="true" notAllowSelectParent="true"/>
				</td>
			</tr>
			<tr id="tr2" hidden="hidden">
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>任务二:</label></td>
				<td  class="width-35" ><form:input path="activities[1].name" htmlEscape="false" maxlength="50" class="form-control required" id="activitieName2"/></td>
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>是否允许撤回:</label></td>
				<td  class="width-35" >
					<form:select path="activities[1].returnBack" class="form-control required" id="option2">
						<form:option value="" label=""/>
						<form:options items="${fns:getDictList('activity_return_back')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
					</form:select>
				</td>
			</tr>
			<tr id="tr2a" hidden="hidden">
				<td  class="width-15 active" id="tdb1"><label class="pull-right">执行角色:</label></td>
				<td  class="width-35" id="tdb2">
					<sys:treeselectRole id="roleb" name="activities[1].role.enname" value="${workActivityMenu.activities[1].role.enname}" labelName="activities[1].role.name" labelValue="${workActivityMenu.activities[1].role.name}"
										title="选择角色" url="/sys/office/treeDataRoleActivityEnname?type=3&isAll=false" cssClass="form-control" allowClear="true" notAllowSelectParent="true"/>

				<%--<form:select path="activities[1].role.enname"  class="form-control " id="rolebst">
					</form:select>
					<input type="hidden" value="${workActivityMenu.activities[1].role.enname}" id="rolebId">--%>
				</td>
				<td  class="width-15 active" id="tdb3"><label class="pull-right">执行人:</label></td>
				<td  class="width-35" id="tdb4">
					<sys:treeselect id="userb" name="activities[1].user.id" value="${workActivityMenu.activities[1].user.id}" labelName="activities[1].user.name" labelValue="${workActivityMenu.activities[1].user.name}"
									title="执行人" url="/sys/office/treeDataAll?type=3" cssClass="form-control " allowClear="true" notAllowSelectParent="true"/>
				</td>
			</tr>
			<tr id="tr3" hidden="hidden">
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>任务三:</label></td>
				<td  class="width-35" ><form:input path="activities[2].name" htmlEscape="false" maxlength="50" class="form-control required" id="activitieName3"/></td>
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>是否允许撤回:</label></td>
				<td  class="width-35" >
					<form:select path="activities[2].returnBack" class="form-control required" id="option3">
						<form:option value="" label=""/>
						<form:options items="${fns:getDictList('activity_return_back')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
					</form:select>
				</td>
			</tr>
			<tr id="tr3a" hidden="hidden">
				<td  class="width-15 active" id="tdc1"><label class="pull-right">执行角色:</label></td>
				<td  class="width-35" id="tdc2">
					<sys:treeselectRole id="rolec" name="activities[2].role.enname" value="${workActivityMenu.activities[2].role.enname}" labelName="activities[2].role.name" labelValue="${workActivityMenu.activities[2].role.name}"
										title="选择角色" url="/sys/office/treeDataRoleActivityEnname?type=3&isAll=false&role=${role.id}" cssClass="form-control "  allowClear="true" notAllowSelectParent="true"/>

				<%--<form:select path="activities[2].role.enname"  class="form-control " id="rolecst">
					</form:select>
					<input type="hidden" value="${workActivityMenu.activities[2].role.enname}" id="rolecId">--%>
				</td>
				<td  class="width-15 active" id="tdc3"><label class="pull-right">执行人:</label></td>
				<td  class="width-35" id="tdc4">
					<sys:treeselect id="userc" name="activities[2].user.id" value="${workActivityMenu.activities[2].user.id}" labelName="activities[2].user.name" labelValue="${workActivityMenu.activities[2].user.name}"
									title="执行人" url="/sys/office/treeDataAll?type=3" cssClass="form-control " allowClear="true" notAllowSelectParent="true"/>
				</td>
			</tr>
			<tr id="tr4" hidden="hidden">
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>任务四:</label></td>
				<td  class="width-35" ><form:input path="activities[3].name" htmlEscape="false" maxlength="50" class="form-control required" id="activitieName4"/></td>
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>是否允许撤回:</label></td>
				<td  class="width-35" >
					<form:select path="activities[3].returnBack" class="form-control required" id="option4">
						<form:option value="" label=""/>
						<form:options items="${fns:getDictList('activity_return_back')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
					</form:select>
				</td>
			</tr>
			<tr id="tr4a" hidden="hidden">
				<td  class="width-15 active" id="tdd1"><label class="pull-right">执行角色:</label></td>
				<td  class="width-35" id="tdd2">
					<sys:treeselectRole id="roled" name="activities[3].role.enname" value="${workActivityMenu.activities[3].role.enname}" labelName="activities[3].role.name" labelValue="${workActivityMenu.activities[3].role.name}"
										title="选择角色" url="/sys/office/treeDataRoleActivityEnname?type=3&isAll=false&role=${role.id}" cssClass="form-control "  allowClear="true" notAllowSelectParent="true"/>

				<%--<form:select path="activities[3].role.enname"  class="form-control " id="roledst">
					</form:select>
					<input type="hidden" value="${workActivityMenu.activities[3].role.enname}" id="roledId">--%>
				</td>
				<td  class="width-15 active" id="tdd3"><label class="pull-right">执行人:</label></td>
				<td  class="width-35" id="tdd4">
					<sys:treeselect id="userd" name="activities[3].user.id" value="${workActivityMenu.activities[3].user.id}" labelName="activities[3].user.name" labelValue="${workActivityMenu.activities[3].user.name}"
									title="执行人" url="/sys/office/treeDataAll?type=3" cssClass="form-control " allowClear="true" notAllowSelectParent="true"/>
				</td>
			</tr>
			<tr id="tr5" hidden="hidden">
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>任务五:</label></td>
				<td  class="width-35" ><form:input path="activities[4].name" htmlEscape="false" maxlength="50" class="form-control required" id="activitieName5"/></td>
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>是否允许撤回:</label></td>
				<td  class="width-35" >
					<form:select path="activities[4].returnBack" class="form-control required" id="option5">
						<form:option value="" label=""/>
						<form:options items="${fns:getDictList('activity_return_back')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
					</form:select>
				</td>
			</tr>
			<tr id="tr5a" hidden="hidden">
				<td  class="width-15 active" id="tde1"><label class="pull-right">执行角色:</label></td>
				<td  class="width-35" id="tde2">
					<%--<form:select path="activities[4].role.enname"  class="form-control " id="roleest">
					</form:select>
					<input type="hidden" value="${workActivityMenu.activities[4].role.enname}" id="roleeId">--%>
						<sys:treeselectRole id="rolee" name="activities[4].role.enname" value="${workActivityMenu.activities[4].role.enname}" labelName="activities[4].role.name" labelValue="${workActivityMenu.activities[4].role.name}"
											title="选择角色" url="/sys/office/treeDataRoleActivityEnname?type=3&isAll=false&role=${role.id}" cssClass="form-control "  allowClear="true" notAllowSelectParent="true"/>

				</td>
				<td  class="width-15 active" id="tde3"><label class="pull-right">执行人:</label></td>
				<td  class="width-35" id="tde4">
					<sys:treeselect id="usere" name="activities[4].user.id" value="${workActivityMenu.activities[4].user.id}" labelName="activities[4].user.name" labelValue="${workActivityMenu.activities[4].user.name}"
									title="执行人" url="/sys/office/treeDataAll?type=3" cssClass="form-control " allowClear="true" notAllowSelectParent="true"/>
				</td>
			</tr>
			<tr id="tr6" hidden="hidden">
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>任务六:</label></td>
				<td  class="width-35" ><form:input path="activities[5].name" htmlEscape="false" maxlength="50" class="form-control required" id="activitieName6"/></td>
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>是否允许撤回:</label></td>
				<td  class="width-35" >
					<form:select path="activities[5].returnBack" class="form-control required" id="option6">
						<form:option value="" label=""/>
						<form:options items="${fns:getDictList('activity_return_back')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
					</form:select>
				</td>
			</tr>
			<tr id="tr6a" hidden="hidden">
				<td  class="width-15 active" id="tdf1"><label class="pull-right">执行角色:</label></td>
				<td  class="width-35" id="tdf2">
					<sys:treeselectRole id="rolef" name="activities[5].role.enname" value="${workActivityMenu.activities[5].role.enname}" labelName="activities[5].role.name" labelValue="${workActivityMenu.activities[5].role.name}"
										title="选择角色" url="/sys/office/treeDataRoleActivityEnname?type=3&isAll=false&role=${role.id}" cssClass="form-control "  allowClear="true" notAllowSelectParent="true"/>

				<%--<form:select path="activities[5].role.enname"  class="form-control " id="rolefst">
					</form:select>
					<input type="hidden" value="${workActivityMenu.activities[5].role.enname}" id="rolefId">--%>
				</td>
				<td  class="width-15 active" id="tdf3"><label class="pull-right">执行人:</label></td>
				<td  class="width-35" id="tdf4">
					<sys:treeselect id="userf" name="activities[5].user.id" value="${workActivityMenu.activities[5].user.id}" labelName="activities[5].user.name" labelValue="${workActivityMenu.activities[5].user.name}"
									title="执行人" url="/sys/office/treeDataAll?type=3" cssClass="form-control " allowClear="true" notAllowSelectParent="true"/>
				</td>
			</tr>
			<tr id="tr7" hidden="hidden">
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>任务七:</label></td>
				<td  class="width-35" ><form:input path="activities[6].name" htmlEscape="false" maxlength="50" class="form-control required" id="activitieName7"/></td>
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>是否允许撤回:</label></td>
				<td  class="width-35" >
					<form:select path="activities[6].returnBack" class="form-control required" id="option7">
						<form:option value="" label=""/>
						<form:options items="${fns:getDictList('activity_return_back')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
					</form:select>
				</td>
			</tr>
			<tr id="tr7a" hidden="hidden">
				<td  class="width-15 active" id="tdg1"><label class="pull-right">执行角色:</label></td>
				<td  class="width-35" id="tdg2">
					<sys:treeselectRole id="roleg" name="activities[6].role.enname" value="${workActivityMenu.activities[6].role.enname}" labelName="activities[6].role.name" labelValue="${workActivityMenu.activities[6].role.name}"
										title="选择角色" url="/sys/office/treeDataRoleActivityEnname?type=3&isAll=false&role=${role.id}" cssClass="form-control "  allowClear="true" notAllowSelectParent="true"/>

				<%--<form:select path="activities[6].role.enname"  class="form-control " id="rolegst">
					</form:select>
					<input type="hidden" value="${workActivityMenu.activities[6].role.enname}" id="rolegId">--%>
				</td>
				<td  class="width-15 active" id="tdg3"><label class="pull-right">执行人:</label></td>
				<td  class="width-35" id="tdg4">
					<sys:treeselect id="userg" name="activities[6].user.id" value="${workActivityMenu.activities[6].user.id}" labelName="activities[6].user.name" labelValue="${workActivityMenu.activities[6].user.name}"
									title="执行人" url="/sys/office/treeDataAll?type=3" cssClass="form-control " allowClear="true" notAllowSelectParent="true"/>
				</td>
			</tr>
			<tr id="tr8" hidden="hidden">
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>任务八:</label></td>
				<td  class="width-35" ><form:input path="activities[7].name" htmlEscape="false" maxlength="50" class="form-control required" id="activitieName8"/></td>
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>是否允许撤回:</label></td>
				<td  class="width-35" >
					<form:select path="activities[7].returnBack" class="form-control required" id="option8">
						<form:option value="" label=""/>
						<form:options items="${fns:getDictList('activity_return_back')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
					</form:select>
				</td>
			</tr>
			<tr id="tr8a" hidden="hidden">
				<td  class="width-15 active" id="tdh1"><label class="pull-right">执行角色:</label></td>
				<td  class="width-35" id="tdh2">
					<sys:treeselectRole id="roleh" name="activities[7].role.enname" value="${workActivityMenu.activities[7].role.enname}" labelName="activities[7].role.name" labelValue="${workActivityMenu.activities[7].role.name}"
										title="选择角色" url="/sys/office/treeDataRoleActivityEnname?type=3&isAll=false&role=${role.id}" cssClass="form-control "  allowClear="true" notAllowSelectParent="true"/>

				<%--<form:select path="activities[7].role.enname"  class="form-control " id="rolehst">
					</form:select>
					<input type="hidden" value="${workActivityMenu.activities[7].role.enname}" id="rolehId">--%>
				</td>
				<td  class="width-15 active" id="tdh3"><label class="pull-right">执行人:</label></td>
				<td  class="width-35" id="tdh4">
					<sys:treeselect id="userh" name="activities[7].user.id" value="${workActivityMenu.activities[7].user.id}" labelName="activities[7].user.name" labelValue="${workActivityMenu.activities[7].user.name}"
									title="执行人" url="/sys/office/treeDataAll?type=3" cssClass="form-control " allowClear="true" notAllowSelectParent="true"/>
				</td>
			</tr>
			<tr id="tr9" hidden="hidden">
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>任务九:</label></td>
				<td  class="width-35" ><form:input path="activities[8].name" htmlEscape="false" maxlength="50" class="form-control required" id="activitieName9"/></td>
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>是否允许撤回:</label></td>
				<td  class="width-35" >
					<form:select path="activities[8].returnBack" class="form-control required"  id="option9">
						<form:option value="" label=""/>
						<form:options items="${fns:getDictList('activity_return_back')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
					</form:select>
				</td>
			</tr>
			<tr id="tr9a" hidden="hidden">
				<td  class="width-15 active" id="tdi1"><label class="pull-right">执行角色:</label></td>
				<td  class="width-35" id="tdi2">
					<sys:treeselectRole id="rolei" name="activities[8].role.enname" value="${workActivityMenu.activities[8].role.enname}" labelName="activities[8].role.name" labelValue="${workActivityMenu.activities[8].role.name}"
										title="选择角色" url="/sys/office/treeDataRoleActivityEnname?type=3&isAll=false&role=${role.id}" cssClass="form-control "  allowClear="true" notAllowSelectParent="true"/>

				<%--<form:select path="activities[8].role.enname"  class="form-control " id="roleist" >
					</form:select>
					<input type="hidden" value="${workActivityMenu.activities[8].role.enname}" id="roleiId">--%>
				</td>
				<td  class="width-15 active" id="tdi3"><label class="pull-right">执行人:</label></td>
				<td  class="width-35" id="tdi4">
					<sys:treeselect id="useri" name="activities[8].user.id" value="${workActivityMenu.activities[8].user.id}" labelName="activities[8].user.name" labelValue="${workActivityMenu.activities[8].user.name}"
									title="执行人" url="/sys/office/treeDataAll?type=3" cssClass="form-control " allowClear="true" notAllowSelectParent="true"/>
				</td>
			</tr>
			<tr id="tr10" hidden="hidden">
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>任务十:</label></td>
				<td  class="width-35" ><form:input path="activities[9].name" htmlEscape="false" maxlength="50" class="form-control required" id="activitieName10"/></td>
				<td  class="width-15 active"><label class="pull-right"><font color="red">*</font>是否允许撤回:</label></td>
				<td  class="width-35" >
					<form:select path="activities[9].returnBack" class="form-control required" id="option10">
						<form:option value="" label=""/>
						<form:options items="${fns:getDictList('activity_return_back')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
					</form:select>
				</td>
			</tr>
			<tr id="tr10a" hidden="hidden">
				<td  class="width-15 active" id="tdj1"><label class="pull-right">执行角色:</label></td>
				<td  class="width-35" id="tdj2">
					<sys:treeselectRole id="rolej" name="activities[9].role.enname" value="${workActivityMenu.activities[9].role.enname}" labelName="activities[9].role.name" labelValue="${workActivityMenu.activities[9].role.name}"
										title="选择角色" url="/sys/office/treeDataRoleActivityEnname?type=3&isAll=false&role=${role.id}" cssClass="form-control "  allowClear="true" notAllowSelectParent="true"
					/>

				<%--<form:select path="activities[9].role.enname"  class="form-control " id="rolejst">
					</form:select>
					<input type="hidden" value="${workActivityMenu.activities[9].role.enname}" id="rolejId">--%>
				</td>
				<td  class="width-15 active" id="tdj3"><label class="pull-right">执行人:</label></td>
				<td  class="width-35" id="tdj4">
					<sys:treeselect id="userj" name="activities[9].user.id" value="${workActivityMenu.activities[9].user.id}" labelName="activities[9].user.name" labelValue="${workActivityMenu.activities[9].user.name}"
									title="执行人" url="/sys/office/treeDataAll?type=3" cssClass="form-control " allowClear="true" notAllowSelectParent="true"/>
				</td>
			</tr>
			<tr >
				<td  class="width-15 active"><label class="pull-right">备注:</label></td>
				<td class="width-35" colspan="3"><form:textarea path="remarks" htmlEscape="false" rows="3" maxlength="200" class="form-control"/></td>
			</tr>
			</tbody>
		</table>
	</form:form>
</body>
</html>