<!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-base_store-add">
        <div class="form-group">
            <label class="col-sm-3 control-label">仓库编号：</label>
            <div class="col-sm-8">
                <input name="storeCode" 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="storeName" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">是否启用：</label>
            <div class="col-sm-8">
                <select name="isEnable" class="form-control m-b" th:with="type=${@dict.getType('sys_yes_no')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">阈值下限：</label>
            <div class="col-sm-8">
                <input name="valueMin" 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="valueMax" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <textarea name="remark" class="form-control" type="text"></textarea>
            </div>
        </div>
        <input name="storeTag" class="form-control" type="hidden" th:value="1">
    </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "manager/base_store"
    $("#form-base_store-add").validate({
        focusCleanup: true
    });

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