<!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-storage-edit" th:object="${wmsStorage}">
            <input name="storageId" th:field="*{storageId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">仓库编码：</label>
                <div class="col-sm-8">
                    <input name="storageNo" th:field="*{storageNo}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">仓库名称：</label>
                <div class="col-sm-8">
                    <input name="storageName" th:field="*{storageName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">仓库状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('storage_status')}">
                        <input type="radio" th:id="${'storageStatus_' + dict.dictCode}" name="storageStatus" th:value="${dict.dictValue}" th:field="*{storageStatus}" required>
                        <label th:for="${'storageStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">仓库地址：</label>
                <div class="col-sm-8">
                    <input name="storageAddress" th:field="*{storageAddress}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">负责人：</label>
                <div class="col-sm-8">
                    <input name="belongTo" th:field="*{belongTo}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">联系电话：</label>
                <div class="col-sm-8">
                    <input name="phone" th:field="*{phone}" class="form-control" type="text" required>
                </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">[[*{remark}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "crm/storage";
        $("#form-storage-edit").validate({
            focusCleanup: true
        });

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