<%@ 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">

	</script>
	<style>
		/*超过5个汉字，调整label的长度，以下是配套的*/
		.layui-item .layui-form-label{
			width:90px;
		}
		.form-group .layui-item .layui-input-block,
		.query .layui-input-block {
			margin-left: 116px;
		}
	</style>
</head>
<body>
<div class="single-form">
	<div class="container">
		<form:form id="inputForm" modelAttribute="sysModular" action="${ctx}/sysmodular/sysModular/save"  method="post" class="form-horizontal" >
			<form:hidden path="id"/>
			<div class="form-group layui-row first">
				<div class="form-group-label"><h2>基础信息</h2></div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label"><span class="require-item">*</span>模块名称：</label>
					<div class="layui-input-block">
						<form:input id="name" readonly="true" path="name" htmlEscape="false" class="form-control   layui-input"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label"><span class="require-item">*</span>对应表名：</label>
					<div class="layui-input-block">
						<form:input id="tableName" readonly="true" path="tableName" htmlEscape="false" class="form-control   layui-input"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label"><span class="require-item">*</span>排序：</label>
					<div class="layui-input-block">
						<form:input id="sort" readonly="true" path="sort" htmlEscape="false" class="form-control number  layui-input"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm12  with-textarea">
					<label class="layui-form-label double-line">预警范围预制SQL：</label>
					<div class="layui-input-block">
						<form:textarea path="sqlString" readonly="true" htmlEscape="false" rows="4"    maxlength="255" class="form-control "/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label"><span class="require-item">*</span>创建日期：</label>
					<div class="layui-input-block">
						<input id="createDate" name="createDate" type="text" readonly="true"  maxlength="20" class="laydate-icondate form-control layer-date  layui-input laydate-icon"
							   value="<fmt:formatDate value="${sysModular.createDate}" pattern="yyyy-MM-dd"/>"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm12  with-textarea">
					<label class="layui-form-label">描述：</label>
					<div class="layui-input-block">
						<form:textarea path="remarks" readonly="true" htmlEscape="false" rows="4"    maxlength="255" class="form-control "/>
					</div>
				</div>
			</div>

			<div class="form-group layui-row">
				<div class="form-group-label"><h2>字段关系</h2></div>
				<div class="layui-item layui-col-xs12 form-table-container" >
					<table id="contentTable" class="table table-bordered table-condensed can-edit no-bottom-margin">
						<thead>
						<tr>
							<th width="200px">字段名称</th>
							<th width="200px">column</th>
							<th width="150px">字段类型</th>
							<th width="200px">排序</th>
							<th width="200px">显示类型</th>
							<th width="200px">字典类型</th>
							<th width="200px">对应类型</th>
						</tr>
						</thead>
						<tbody id="sysModularFieldList">
						<c:if test="${not empty sysModular.sysModularFieldList}">
							<c:forEach items="${sysModular.sysModularFieldList}" var="sysModularField" varStatus="index">
								<tr id="sysModularFieldList${index.index}">
									<td class="hide">
										<input id="sysModularFieldList${index.index}_id" name="sysModularFieldList[${index.index}].id" type="hidden" value="${sysModularField.id}"/>
										<input id="sysModularFieldList${index.index}_modularId" name="sysModularFieldList[${index.index}].modularId" type="hidden" value="${sysModularField.modularId}"/>
										<input id="sysModularFieldList${index.index}_delFlag" name="sysModularFieldList[${index.index}].delFlag" type="hidden" value="0"/>
									</td>
									<td>
										<input id="sysModularFieldList${index.index}_1"  name="sysModularFieldList[${index.index}].notes"   type="text" value="${sysModularField.notes}"   class="form-control "/>
									</td>
									<td>
										<input id="sysModularFieldList${index.index}_2"  name="sysModularFieldList[${index.index}].field"   type="text" value="${sysModularField.field}"   class="form-control "/>
									</td>
									<td>
										<input id="sysModularFieldList${index.index}_3"  name="sysModularFieldList[${index.index}].fieldType"    type="text" value="${sysModularField.fieldType}"   class="form-control "/>
									</td>
									<td>
										<input id="sysModularFieldList${index.index}_4"  name="sysModularFieldList[${index.index}].sort"    type="text" value="${sysModularField.sort}"   class="form-control "/>
									</td>
									<td>
										<input id="sysModularFieldList${index.index}_5"   type="text" value="${fns:getDictLabel(sysModularField.showType, 'show_type', '')}"   class="form-control "/>
									</td>
									<td>
										<input id="sysModularFieldList${index.index}_6"   type="text" value="${fns:getDictLabel(sysModularField.isSysDict, 'isSysDict', '')}"   class="form-control "/>
									</td>
									<td>
										<input id="sysModularFieldList${index.index}_7"  name="sysModularFieldList[${index.index}].logic"    type="text" value="${sysModularField.logic}"   class="form-control "/>
									</td>
								</tr>
							</c:forEach>
						</c:if>
						</tbody>
					</table>
				</div>
			</div>
			<div class="form-group layui-row page-end"></div>
		</form:form>
	</div>
</div>
</body>
</html>