<!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-property-add">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">所属市州：</label>
                <div class="col-sm-8">
                    <input name="part" 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="areaId" 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="frameworkId" 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="useDepart" required 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" 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">
                    <div class="input-group date">
                        <input name="useDate" required class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">登记部门：</label>
                <div class="col-sm-8">
                    <input name="recoverDepart" class="form-control" readonly th:value="${sysuser.dept.deptName}" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">登记人员：</label>
                <div class="col-sm-8">
                    <input name="recoverName" class="form-control" readonly th:value="${sysuser.userName}" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">登记日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="recoverDate" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">资产数量：</label>
                <div class="col-sm-8">
                    <input name="propertyNum" digits="true" class="form-control" type="text" required>
                </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/property"
        $("#form-property-add").validate({
            focusCleanup: true
        });

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

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

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