<!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-edit" th:object="${baseStore}">
            <input name="storeId" th:field="*{storeId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">仓库编号：</label>
                <div class="col-sm-8">
                    <input name="storeCode" th:field="*{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" th:field="*{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}" th:field="*{isEnable}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">阈值下限：</label>
                <div class="col-sm-8">
                    <input name="valueMin" th:field="*{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" th:field="*{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" th:field="*{remark}" class="form-control" type="text"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "manager/base_store";
        $("#form-base_store-edit").validate({
            focusCleanup: true
        });

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