<%@ 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 isValidate = jp.validateForm('#inputForm');//校验表单
            if(!isValidate){
                return false;
            }else{
                jp.loading();
                jp.post("${ctx}/sg/managementcenter/materialInventory/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="materialInventory" class="form-horizontal">
		<form:hidden path="id"/>	
		<table class="table table-bordered">
		   	<tbody>
                <tr>
                    <td class="width-15 active"><label class=""><font color="red">*</font>物料编码：</label></td>
                    <td class="width-35">
                        <form:input path="materialCode" htmlEscape="false" class="form-control required "/>
                    </td>
                    <td class="width-15 active"><label class=""><font color="red">*</font>物料描述：</label></td>
                    <td class="width-35">
                        <form:input path="materialDetail" htmlEscape="false" class="form-control required"/>
                    </td>
                </tr>
                <tr>
                    <td class="width-15 active"><label class=""><font color="red">*</font>非限制性库存数量：</label></td>
                    <td class="width-35">
                        <form:input path="stockQuantity" htmlEscape="false" class="form-control required number"/>
                    </td>
                    <td class="width-15 active"><label class=""><font color="red">*</font>已冻结库存数量：</label></td>
                    <td class="width-35">
                        <form:input path="frozenQuantity" htmlEscape="false" class="form-control required number"/>
                    </td>
                </tr>
                <tr>
                    <td class="width-15 active"><label class=""><font color="red">*</font>需求数量：</label></td>
                    <td class="width-35">
                        <form:input path="requireCount" htmlEscape="false" class="form-control required number"/>
                    </td>
                    <td class="width-15 active"><label class=""><font color="red">*</font>已出库数量：</label></td>
                    <td class="width-35">
                        <form:input path="outCount" htmlEscape="false" class="form-control required number"/>
                    </td>
                </tr>
                <tr>
                    <td class="width-15 active"><label class=""><font color="red">*</font>可用库存数量：</label></td>
                    <td class="width-35">
                        <form:input path="availableStockQuantity" htmlEscape="false" class="form-control required number"/>
                    </td>
                </tr>
		 	</tbody>
		</table>
	</form:form>
</body>
</html>