<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>复核标准管理</title>
    <meta name="decorator" content="default"/>
    <%@include file="/webpage/include/treetable.jsp" %>
    <script type="text/javascript">
        $(document).ready(function() {
            $("#treeTable").treeTable({expandLevel : 5},{ expandable: true });
        });
    </script>
	<style>
		body{
			background-color:transparent;
			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
			color:#ffffff;
			background-color:rgba(255,255,255,0);
			height:100%;
		}
	</style>
</head>
<body >
	<div class="wrapper wrapper-content">
		<sys:message content="${message}"/>
		<div class="layui-row">
			<div class="full-width fl">
				<div class="contentShadow layui-row" id="queryDiv">
				<form:form id="searchForm" modelAttribute="workReviewStandard" action="${ctx}/workreview/workReviewStandard/" method="post" class="form-inline">

					<div class="commonQuery">
						<div class="layui-item query athird">
							<label class="layui-form-label">标准内容：</label>
							<div class="layui-input-block with-icon">
								<form:input path="standardDetail" htmlEscape="false" class=" form-control layui-input"></form:input>
							</div>
						</div>
						<div class="layui-item query athird">
							<label class="layui-form-label">序号：</label>
							<div class="layui-input-block">
								<form:input path="orderNum" htmlEscape="false" class=" form-control layui-input"></form:input>
							</div>
						</div>
						<div class="layui-item athird">
							<div class="input-group">
								<button id="searchReset" style="margin-right: 10px;" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
							</div>
						</div>
						<div style="    clear:both;"></div>
					</div>

					</form:form>
				</div>
			</div>
			<div class="full-width fl">
				<div class="contentShadow layui-form contentDetails">
					<div class="nav-btns">
						<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
						<div style="clear: both;"></div>
					</div>

	
					<!-- 表格 -->
					<table id="treeTable" class="table table-bordered table-hover list-table">
						<thead>
							<tr>
								<th  width="40%">标准内容</th>
								<th  >最多扣分</th>
								<th >序号</th>
								<th width="240px">操作</th>
							</tr>
						</thead>
						<tbody>
						<c:forEach items="${list}" var="workReviewStandard">
							<tr id="${workReviewStandard.id}" pid="${workReviewStandard.parent.id}">
								<td><a  href="#" onclick="openDialogView('查看复核标准', '${ctx}/workreview/workReviewStandard/view?id=${workReviewStandard.id}','95%', '95%')">
										${workReviewStandard.standardDetail}
								</a></td>
								<td style="text-align: center">
									${workReviewStandard.maxDeduct}
								</td>
								<td style="text-align: center">
									${workReviewStandard.orderNum}
								</td>
								<td class="op-td text-center">
									<div class="op-btn-box">
										<c:if test="${workReviewStandard.grade == 1 or (workReviewStandard.grade==2 and workReviewStandard.proofread == 1)}">
											<shiro:hasPermission name="workreview:workReviewStandard:add">
												<a href="javascript:void(0);" onclick="openDialog('添加标准', '${ctx}/workreview/workReviewStandard/form?parent.id=${workReviewStandard.id}','95%','95%')" class="op-btn op-btn-add"><i class="fa fa-plus"></i> 添加下级标准</a>
											</shiro:hasPermission>
										</c:if>
										<c:if test="${workReviewStandard.grade >=2}">
										<shiro:hasPermission name="workreview:workReviewStandard:edit">
											<a href="javascript:void(0);" onclick="openDialog('修改复核标准', '${ctx}/workreview/workReviewStandard/form?id=${workReviewStandard.id}','95%','95%')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 修改</a>
										</shiro:hasPermission>
										<shiro:hasPermission name="workreview:workReviewStandard:del">
											<a href="${ctx}/workreview/workReviewStandard/delete?id=${workReviewStandard.id}" onclick="return confirmx('确认要删除该复核标准及其子复核标准吗？', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
										</shiro:hasPermission>
										</c:if>
									</div>
								</td>
							</tr>
						</c:forEach>
						</tbody>
					</table>
	
		<!-- 分页代码 -->
	<%--<table:page page="${page}"></table:page>--%>

				</div>
			</div>
		</div>
</div>
	<script>
        resizeListWindow1();
        $(window).resize(function(){
            resizeListWindow1();
        });
	</script>
</body>
</html>