<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>模块表</title>
	<meta name="decorator" content="ani"/>
	<script type="text/javascript">

		$(document).ready(function() {

	        $('#beginDate').datetimepicker({
				 format: "YYYY-MM-DD HH:mm:ss"
		    });
	        $('#endDate').datetimepicker({
				 format: "YYYY-MM-DD HH:mm:ss"
		    });
		});
		function save() {
            var mdImg = $("#mdImg").val();
            var isValidate = jp.validateForm('#inputForm');//校验表单
            if(!isValidate){
                return false;
			}else{
                jp.loading();
                jp.post("${ctx}/managementcenter/moduleacquisition/save",$('#inputForm').serialize(),function(data){
                    if(data.success){
                        jp.getParent().refresh();
                        var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
                        parent.layer.close(dialogIndex);
                        jp.success(data.msg)

                    }else{
                        jp.error(data.msg);
                    }
                })
			}

        }
	</script>
</head>
<body class="bg-white">
		<form:form id="inputForm" modelAttribute="moduleBlock" class="form-horizontal">
		<form:hidden path="id"/>	
		<table class="table table-bordered">
			<tbody>
				<tr>
					<td class="width-15 active"><label class="pull-right">模块名称：</label></td>
					<td class="width-35">
						<form:input path="mdSmallClass" htmlEscape="false"   class="form-control"/>
					</td>
					<td class="width-15 active"><label class="pull-right" style="float: left">模块大类：</label></td>
					<td class="width-35">
						<form:input path="mdBigClass" htmlEscape="false" class="form-control"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">模块中类：</label></td>
					<td class="width-35">
						<form:input path="mdTheClass" htmlEscape="false"    class="form-control"/>
					</td>
					<td class="width-15 active"><label class="pull-right">单位：</label></td>
					<td class="width-35">
						<form:input path="mdUnit" htmlEscape="false"    class="form-control"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>上传附件：</label></td>
					<td class="width-35">
						<sys:fileUpload  path="mdImg" fileNumLimit="50" fileSizeLimit="50" value="${moduleBlock.mdImg}" uploadPath="/pick"></sys:fileUpload>
					</td>
				</tr>
			</tbody>
		</table>
	</form:form>
</body>
</html>