<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('更改设备登记')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-info-edit" th:object="${tdPropertyInfo}">
        <input name="id" th:field="*{id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">登记编号：</label>
            <div class="col-sm-8">
                <input name="id" disabled th:field="*{id}" 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="useId" disabled th:field="*{useId}" 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="propertyBrand" disabled th:field="*{propertyBrand}" 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="propertyType" disabled class="form-control m-b" th:with="type=${@dict.getType('sys_sm_property')}">
                    <option value="">---请选择---</option>
                    <option  th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{propertyType}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">资产型号：</label>
            <div class="col-sm-8">
                <input name="propertyNo" disabled th:field="*{propertyNo}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">资产SN码：</label>
            <div class="col-sm-8">
                <input name="propertySn" disabled th:field="*{propertySn}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">使用人员：</label>
            <div class="col-sm-8">
                <input name="username" required th:field="*{username}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">使用部门：</label>
            <div class="col-sm-8">
                <input name="part" required th:field="*{part}" class="form-control" type="text">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
    var prefix = ctx + "system/propertychange";
    $("#form-info-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-info-edit').serialize());
        }
    }

    $("input[name='maintainDate']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    $("input[name='destoryDate']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });
</script>
</body>
</html>