<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ include file="../language.jsp" %>

<script src="../scripts/itsm/rules/addRule.js?random=<%=new java.util.Date().getTime()%>"></script>



<script>var _rulePackageNo = "${param.rulePackageNo}"</script>



<div class="loading" id="addRule_loading"><img src="../images/icons/loading.gif" /></div>





<div class="easyui-panel content"  border="none" fit="true"  id="addRule_content">



<div id="addRuleDiv" class="easyui-panel" border="none" fit="true">



<form id="addRuleForm">
	<!-- 新的面板 start-->

	<div class="easyui-layout" fit="true">


	<div region="north" border="false" style="overflow: hidden; border-top: #99bbe8 1px solid; border-left: #99bbe8 1px solid; border-right: #99bbe8 1px solid; height: 35px; padding: 4px; text-align: right">
	<a class="easyui-linkbutton" plain="true" icon="icon-save" style="margin-right: 15px" id="addRule_saveRuleBtn"><fmt:message key="common.save" /></a>
	<a class="easyui-linkbutton" plain="true" icon="icon-undo" style="margin-right: 15px" id="addRule_returnRuleGrid"><fmt:message key="common.returnToList" /></a>
	</div>

	<!-- 左边规则信息 -->
	<div region="west" split="true" title="<fmt:message key="common.basicInfo" />" style="width:380px;">


	<input type="hidden" name="rule.rulePackage.rulePackageNo" value="${param.rulePackageNo}" /> 
	<input type="hidden" name="rule.dialect" value="mvel">
	<input type="hidden" name="rule.condition.patternBinding" value="dto">
	<input type="hidden" name="rule.condition.patternType" value="RequestDTO">

	<div class="lineTableBgDiv">
	<table style="width:100%" class="lineTable" cellspacing="1">
		
		<tr>
			<td style="width: 20%"><fmt:message key="label.rule.ruleName" /></td>
			<td style="width: 80%"><input name="rule.ruleName" class="easyui-validatebox input" validType="length[1,200]" required="true" /></td>
		</tr>



		<tr>
			<td><fmt:message key="label.rule.ruleDecription" /></td>
			<td><textarea name="rule.description" class="easyui-validatebox textarea" validType="length[5,200]" required="true" ></textarea></td>
		</tr>



	</table>
	
	
	
	
</div>

	</div>

	<!-- 扩展信息 start -->
	<div region="center" title="<fmt:message key="common.detailInfo" />" style="background: #eee;">

	<div class="easyui-tabs" fit="true" border="false">



	<div title="<fmt:message key="title.rule.ruleSet" />" style="overflow: hidden; padding: 3px">



	<div class="easyui-panel" title="<fmt:message key="title.rule.addOrEdirRuleSet" />" collapsible="false" minimizable="false" maximizable="false" closable="false" style="height: 120px">

		<div class="lineTableBgDiv">
			<table style="width:100%" class="lineTable" cellspacing="1">
				<tr>
					<td style="width:25%"><fmt:message key="label.rule.fitStyle" /></td>
					<td style="width:75%">
					<input id="add_rule_or" type="radio" name="orand" checked/><fmt:message key="label.rule.fitOne" />
					<input id="add_rule_and" type="radio" name="orand"  /><fmt:message key="label.rule.fitAll" />
					</td>
				</tr>
				<tr>
					<td><fmt:message key="label.rule.ruleSetDetail" /></td>
					<td>
		
		
		
					<table style="width:100%">
					
					<tr>
					<td style="width:15%">
						<select id="addRule_team"></select> 
					</td>
					<td style="width:15%">
						<select id="addRule_matical"></select> 
					</td>
					<td style="width:40%">
						<div id="addRule_propertyValueDIV" style="float:left">
							<input id="addRule_propertyValue" size="30" value="" /> 
						</div>
					</td>
					
					<td style="width:30%">
						<a class="easyui-linkbutton" plain="true" id="addRule_addRulesToList" icon="icon-ok" style="margin-right: 15px"><fmt:message key="label.rule.confirm" /></a>
					</td>
					
					</tr>
					
					
					</table>
		
		
		
		
		
		
					

					
					
					
					
					
					</td>
				</tr>
				
			</table>
		
		</div>

	</div>


	<div style="height: 3px"></div>



	<div class="easyui-panel" title="<fmt:message key="title.rule.ruleSet" />" collapsible="false" minimizable="false" maximizable="false" closable="false" style="height: 200px;">
		<div class="lineTableBgDiv">
			<table id="addRule_constraintsTable"  style="width:100%" class="lineTable" cellspacing="1">
				<tr>
					<td style="width: 25%; font-weight: bold; text-align: center; color: #15428b"><fmt:message key="label.rule.condition" /></td>
					<td style="width: 50%; font-weight: bold; text-align: center; color: #15428b"><fmt:message key="label.rule.ruleContent" /></td>
					<td style="width: 25%; font-weight: bold; text-align: center; color: #15428b"><fmt:message key="label.rule.operation" /></td>
				</tr>
			</table>
		</div>
	</div>






	</div>




	<c:if test="${param.tag!='autoUpdate'}">
	<div title="<fmt:message key="title.rule.actionSet" />" style="overflow: hidden; padding:3px;">






	<div class="easyui-panel" title="<fmt:message key="title.rule.addOrEditActionSet" />" collapsible="false" minimizable="false" maximizable="false" closable="false" style="height: 120px">



		<div class="lineTableBgDiv">
			<table style="width:100%" class="lineTable" cellspacing="1">
				<tr>
					<td style="width: 25%"><fmt:message key="label.rule.actionType" /></td>
					<td style="width: 75%">
						<select id="addRule_executeAction"></select>
					</td>
				</tr>
				<tr>
					<td><fmt:message key="label.rule.actionDetail" /></td>
					<td>
					
					<table width="100%">
					
					<tr>
					<td style="width:60%">
						<div id="givenValueDIV">

							<input id='givenValue_Panel' style='width:100%;cursor:pointer;color:#555555' readonly/>
							<input type='hidden' id='givenValue' />
			
						</div>
					</td>
					
					<td style="width:40%">
						<a class="easyui-linkbutton" plain="true" icon="icon-ok" id="addRule_addActionToList" style="margin-right:15px"><fmt:message key="label.rule.confirm" /></a>
					</td>
						
					</tr>
					
					</table>
					
					
					
					
					</td>
				</tr>
			</table>
		</div>


	</div>



<div style="height:3px"></div>

	<div class="easyui-panel" title="<fmt:message key="title.rule.actionSet" />" collapsible="false" minimizable="false" maximizable="false" closable="false" style="height: 200px;">
			<div class="lineTableBgDiv">
			<table id="addRule_actionTable" style="width:100%" class="lineTable" cellspacing="1">
				<tr>
					<td style="width: 25%; height: 32px; font-weight: bold; text-align: center; color: #15428b"><fmt:message key="label.rule.actionType" /></td>
					<td style="width: 50%; font-weight: bold; text-align: center; color: #15428b"><fmt:message key="label.rule.actionDetail" /></td>
					<td style="width: 25%; font-weight: bold; text-align: center; color: #15428b"><fmt:message key="label.rule.operation" /></td>
				</tr>
			</table>
		</div>
	</div>


	</div>


</c:if>






	</div>
	</div>


	</div>




</form>


</div>




</div>


<!-- 选择服务机构 -->
<div id="addRuleSeclceServicesOrgDIV" title="<fmt:message key="title.rule.chooseServiceOrg" />" class="easyui-window"  closed="true" collapsible="false" minimizable="false" maximizable="false" modal="true" style="width:200px;height:280px; padding:10px; line-height:20px;" >
	
	<div id="addRuleSeclceServicesOrgTreeDIV"></div>
	
</div>



