<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>私塾家</title>
<script th:include="sys/common/metaCSS" th:remove="tag"></script> 
<script th:include="sys/common/metaJS" th:remove="tag"></script> 
</head>
 <style type="text/css">
   body{min-width:180px;}
       .select1{
   		    width:100%;
		    height: 32px;
		    line-height: 32px;
		    border-top: solid 1px #a7b5bc;
		    border-left: solid 1px #a7b5bc;
		    border-right: solid 1px #ced9df;
		    border-bottom: solid 1px #ced9df;
		    opacity:1;
	        margin-bottom: 10px;
    	}
    	.btn{
    	  width: 100px;
    	}
     label.control-label-error {color: Red;}	
    </style>
<body>
<div class="formbody">
		<input type="hidden" name="libId" id="libId" th:value="${libId}" />
		<ul class="forminfo">
			<li>
				<label>新增二维码数量:<b>*</b></label>
				<input type="number" id="num" class="dfinput fl" name="num"  value="1"/>
			</li>
			<li>
				<label>&nbsp;</label>
				<button type="submit" onclick="push_user();" class="btn">提交</button>
				<button type="button" class="btn" onclick="closeWin();">取消</button>
			</li>
		</ul>
</div>
</body>
<script type="text/javascript">
function push_user(){
	var content ="您确定要新增记录吗?";
	parent.layer.confirm(content, {
		icon: 4, btn: ['确定','关闭'] //按钮
	}, function(){
		var url="[[${sysUrl}]]/sys/lib/libDetailSave";
		 var params ={
		            'libId' : $("#libId").val(),
		            'num' : $("#num").val()
		        };
		$.post(url,params,function(data){
			if(data.meta.success){
				parent.layer.msg("新增成功",{icon:1});
				closeWin();
			}else{
				parent.layer.msg(data.meta.message,{icon:11});
				closeWin();
			}
		});
	});
}
function closeWin(){
	parent.location.reload();
	parent.layer.close(parent.layer.getFrameIndex(window.name));
}
</script>
</html>