<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增物料基础信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-materialinfo-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">物料ID：</label>
                <div class="col-sm-8">
                    <input name="materialId" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">物料名称：</label>
                <div class="col-sm-8">
                    <input name="materialName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">物料规格：</label>
                <div class="col-sm-8">
                    <input name="materialCode" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">物料类型ID：</label>
                <div class="col-sm-8">
                    <select name="materialTypeId" id="materialTypeId" class="form-control ">
                        <option value="">--请选择物料类型--</option>
                        <option name="cbMaterialTypeInfo" th:each="materialTypeId:${cbMaterialTypeInfo}" th:value="${materialTypeId.materialTypeId}" th:text="${materialTypeId.materialTypeName}" th:disabled="${materialTypeId.status == '1'}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="remark" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "baseinfo/materialinfo"
        $("#form-materialinfo-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-materialinfo-add').serialize());
            }
        }
    </script>
</body>
</html>