<!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-datadictionarydetail-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">id：</label>
                <div class="col-sm-8">
                    <input name="datadictionarydetailid" 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="datadictionaryid" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">父id：</label>
                <div class="col-sm-8">
                    <div class="input-group">
                        <input id="treeId" name="parentid" type="hidden" th:value="${baseDatadictionarydetail?.datadictionarydetailid}"/>
                        <input class="form-control" type="text" onclick="selectDatadictionarydetailTree()" id="treeName" readonly="true" th:value="${baseDatadictionarydetail?.datadictionarydetailid}">
                        <span class="input-group-addon"><i class="fa fa-search"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">名称1：</label>
                <div class="col-sm-8">
                    <input name="code" 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="fullname" 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="enabled" 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="sortcode" 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="deletemark" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">创建时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="createdate" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">创建的用户id：</label>
                <div class="col-sm-8">
                    <input name="createuserid" 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="createusername" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">修改时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="modifydate" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">修改者id：</label>
                <div class="col-sm-8">
                    <input name="modifyuserid" 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="modifyusername" 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="jyfw" 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="istree" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">材料flg：</label>
                <div class="col-sm-8">
                    <input name="clflg" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">no用户：</label>
                <div class="col-sm-8">
                    <input name="nouser" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "system/datadictionarydetail";
        $("#form-datadictionarydetail-add").validate({
            focusCleanup: true
        });

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

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

        /*行业树表-新增-选择父部门树*/
        function selectDatadictionarydetailTree() {
            var options = {
                title: '行业树表选择',
                width: "380",
                url: prefix + "/selectDatadictionarydetailTree/" + $("#treeId").val(),
                callBack: doSubmit
            };
            $.modal.openOptions(options);
        }

        function doSubmit(index, layero){
            var body = layer.getChildFrame('body', index);
               $("#treeId").val(body.find('#treeId').val());
               $("#treeName").val(body.find('#treeName').val());
               layer.close(index);
        }
    </script>
</body>
</html>