<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('货位管理信息表新增')" />
    <th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-role-add">
        <div class="row">
            <div class="col-sm-12">
                <div class="form-group">
                    <!--is-required 增加星号 显示为必填-->
                            <label class="col-sm-3 control-label">质量区域:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="qualityArea" id="qualityArea" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">类型:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="type" id="type" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">编码:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="code" id="code" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">宽高深（CM）:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="dimensions" id="dimensions" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">备注:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="remarks" id="remarks" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">默认状态:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="defaultStatus" id="defaultStatus" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">货位状态:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="locationStatus" id="locationStatus" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                </div>
            </div>

        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script type="text/javascript">

    function submitHandler() {
        if ($.validate.form()) {
            add();
        }
    }

    function add() {
           var qualityArea = $("input[name='qualityArea']").val();
           var type = $("input[name='type']").val();
           var code = $("input[name='code']").val();
           var dimensions = $("input[name='dimensions']").val();
           var remarks = $("input[name='remarks']").val();
           var defaultStatus = $("input[name='defaultStatus']").val();
           var locationStatus = $("input[name='locationStatus']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skcknstoragelocation/sKcKnStoragelocationAdd",
            data : {
                "qualityArea": qualityArea,
                "type": type,
                "code": code,
                "dimensions": dimensions,
                "remarks": remarks,
                "defaultStatus": defaultStatus,
                "locationStatus": locationStatus,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
