336eca178cd45b81707384357407f0e1b549ce97.svn-base 9.29 KB
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>证书信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
	  $(document).ready(function() {
		    var temppagen;
			$("#searchForm").validate({
				submitHandler: function(form){
					loading('正在提交,请稍等...');
					getUrl();
				    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);
					}
				}
			});
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	//return false;
        }
		
		function onSelectinfo() {
			var zsbm = $("#zsbmtext").val();
			var zslx = $("#zslxtext").val();
			var ywh = $("#ywhtext").val();
			var szr = $("#szrtext").val();
			var szzh = $("#szzhtext").val();
			var creater = $("#creatertext").val();
			var isbf = $("#isbftext").val();
			var url = "";
			if(zsbm == null || zsbm == ""){
				url = "${ctx}/reg/base/regBaseZsglb/list?zslx="+zslx+"&szr="+szr+"&szzh="+szzh+"&creater="+creater+"&isbf="+isbf+"&ywh="+ywh+"&all=all";
				$("#zsbmtext").val("0");
			}else{
				url = "${ctx}/reg/base/regBaseZsglb/list?zsbm="+zsbm+"&zslx="+zslx+"&szr="+szr+"&szzh="+szzh+"&creater="+creater+"&isbf="+isbf+"&ywh="+ywh+"&all=all";
			}
			$("#searchForm").attr("action", url);
		}
		
		function selectAll(){
            if ($("#SelectAll").is(":checked")){
                $("input[name='subcheck']").prop("checked", true);//所有选择框都选中
            }else{
                $("input[name='subcheck']").prop("checked", false);
            }
        }
		
		//批量删除
        function batchDeletes(){
           //判断至少写了一项
           var checkedNum = $("input[name='subcheck']:checked").length;
           if(checkedNum==0){
               alert("请至少选择一项!");
               return false;
           }
           if(confirm("确定删除所选项目?")){
           var checkedList = new Array();
           $("input[name='subcheck']:checked").each(function(){
               checkedList.push($(this).val());
           });
           $.ajax({
                type:"POST",
                url:"${ctx}/reg/base/regBaseZsglb/batchDeletes",
                data:{"delitems":checkedList.toString()},
                datatype:"json",
                success:function(model1){
					alert("成功删除("+model1.data+")条!");
                    setTimeout("location.reload()",1000);//页面刷新
                },
                error:function(model1){
                	alert("删除失败!");
                }
            });
            }
        }
        function winOpenDelete(id){
        	if (confirm("确认要删除该证书信息吗?")) {
        		var url = "${ctx}/reg/base/regBaseZsglb/delete?id="+id+"&parazsbh="+$("#zsbmtext").val()+"&parazslx="+$("#zslxtext").val()+"&paraywh="+$("#ywhtext").val()+"&parazt="+$("#isbftext").val()+"&paraszr="+$("#szrtext").val()+"&paraszbh="+$("#szzhtext").val()+"&paracjz="+$("#creatertext").val()+"&pageNo="+$("#pageNo").val()+"&pageSize="+$("#pageSize").val();
        		window.location= url;
        	}
        }	
        function getUrl() {
        	var url = "${ctx}/reg/base/regBaseZsglb/list";
        	//?all=all&parazsbh="+$("#zsbmtext").val()+"&parazslx="+$("#zslxtext").val()+"&paraywh="+$("#ywhtext").val()+"&parazt="+$("#isbftext").val()+"&paraszr="+$("#szrtext").val()+"&paraszbh="+$("#szzhtext").val()+"&paracjz="+$("#creatertext").val()
        	$("#searchForm").attr("action", url);  
        
        	//window.location.href = url;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/reg/base/regBaseZsglb/">证书编号列表</a></li>
		<shiro:hasPermission name="reg:base:regBaseZsglb:edit"><li><a href="${ctx}/reg/base/regBaseZsglb/form">证书编号添加</a></li></shiro:hasPermission>
	</ul>
	 <form:form id="searchForm" action="#" modelAttribute="regBaseZsglb" ethod="post" class="breadcrumb form-search"> 
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/> 
		<ul class="ul-form">
			<li><label>证书编号:</label>
				<form:input path="zsbm" id="zsbmtext" htmlEscape="false" maxlength="12" class="input-medium digits"/>
			</li>
			<li><label>证书类型:</label>
				<form:select id="zslxtext" path="zslx" class="input-large ">
				<form:option value="" label=""/>
				<form:options items="${fns:getDictList('reg_bus_szmc')}" itemLabel="label" itemValue="value" htmlEscape="false" />
				</form:select>
			</li>
			<li><label>业务号:</label>
				<form:input path="ywh" id="ywhtext" htmlEscape="false" maxlength="12" class="input-medium digits"/>
			</li>
			<li><label>状态:</label>
				<form:select path="isbf" id="isbftext" class="input-medium ">
					<form:option value=""  label=" "/>
					<form:option value="0"  label="未引用"/>
					<form:option value="1"  label="已引用"/>
					<form:option value="2"  label="已报废"/>
				</form:select>
			</li>
			<li><label>繕证人:</label>
				<form:input path="szr" id="szrtext" htmlEscape="false" maxlength="50" class="input-medium"/>
			</li>
			<li><label>繕证编号:</label>
				<form:input path="szzh" id="szzhtext" htmlEscape="false" maxlength="20" class="input-medium digits"/>
			</li>
			<li><label>创建者:</label>
				<form:input path="creater" id="creatertext" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" onclick="getUrl()" value="查询"/></li>
			<li class="btns"><input id="btnBatchDeletes" class="btn btn-primary" type="button" value="批量删除" onclick="batchDeletes()"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<td align="center"><input type="checkbox" id="SelectAll"
                                onclick="selectAll();" /></td>
				<th>证书编码</th>
				<th>证书类型</th>
				<th>繕证人</th>
				<th>繕证证号</th>
				<th>业务号</th>
				<th>创建者</th>
				<th>创建时间</th>
				<th>备注信息</th>
				<th>状态</th>
				<shiro:hasPermission name="reg:base:regBaseZsglb:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="regBaseZsglb">
			<tr>
				<c:if test="${regBaseZsglb.isbf eq '0'}">
					<td align="center"><input type="checkbox" id="subcheck"
	                    name="subcheck" value="${regBaseZsglb.id}" />
	                </td>
				</c:if>
				<c:if test="${regBaseZsglb.isbf ne '0'}">
					<td align="center"><input type="checkbox" id="subcheck1"
	                    name="subcheck1" disabled="disabled"/>
	                </td>
				</c:if>
				<td>
					<a href="${ctx}/reg/base/regBaseZsglb/form?id=${regBaseZsglb.id}&VIEWS=1&update=1">
						${regBaseZsglb.zsbm}
					</a>
				</td>
				<td>
					${fns:getDictLabel(regBaseZsglb.zslx, 'reg_bus_szmc', '')}
					<c:if test="${regBaseZsglb.zslx eq '1'}">
						<c:choose>  
						   <c:when test="${regBaseZsglb.isdj eq 'J'}">(集成版)
						   </c:when>  
						   <c:otherwise>(单一版)
						   </c:otherwise>
						</c:choose>
						${fns:getDictLabel(regBaseZsglb.isdj, 'reg_bus_szmc', '')}
					</c:if>
				</td>
				<td>
					${regBaseZsglb.szr}
				</td>
				<td>
					${regBaseZsglb.szzh}
				</td>
				<td>
					${regBaseZsglb.ywh}
				</td>
				<td>
					${regBaseZsglb.creater}
				</td>
				<td>
					<fmt:formatDate value="${regBaseZsglb.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					${regBaseZsglb.remarks}  
				</td>
				<td>
					<c:if test="${regBaseZsglb.isbf eq '0'}">
						未引用
					</c:if>
					<c:if test="${regBaseZsglb.isbf eq '1'}">
						已引用
					</c:if>
					<c:if test="${regBaseZsglb.isbf eq '2'}">
						已报废
					</c:if>
				</td>
				<shiro:hasPermission name="reg:base:regBaseZsglb:edit"><td>
				<c:if test="${empty regBaseZsglb.szr && regBaseZsglb.isbf eq '0'}">
    				<a href="${ctx}/reg/base/regBaseZsglb/form?id=${regBaseZsglb.id}&update=1">修改</a>
					<%-- <a href="${ctx}/reg/base/regBaseZsglb/delete?id=${regBaseZsglb.id}" onclick="return confirmx('确认要删除该证书信息吗?', this.href)">删除</a> --%>
					<a href="javascript:void(0);" onclick="winOpenDelete('${regBaseZsglb.id}');">删除</a>
					<c:if test="${regBaseZsglb.isbf eq '0'}">
						<a href="${ctx}/reg/base/regBaseZsglb/update?id=${regBaseZsglb.id}&isZf=1" onclick="return confirmx('确认要作废该证书信息吗?', this.href)">报废</a>
					</c:if>
				</c:if>
				<c:if test="${regBaseZsglb.isbf eq '2'}">
					<a href="${ctx}/reg/base/regBaseZsglb/update?id=${regBaseZsglb.id}&isZf=0" onclick="return confirmx('确认要恢复作废该证书信息吗?', this.href)">报废回退</a>
				</c:if>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>