<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <head>
        <script th:replace="common/head"></script>
        <style type="text/css">
            .layui-upload-img{
                width: 92px;
                height: 92px;
                margin: 0 10px 10px 0;
            }
        </style>
    </head>
    <body>
        <!--/*@thymesVar id="onLineUser" type="com.sptg.permissions.api.entity.Account"*/-->
        <input type="hidden" id="user_org_id" th:value="${onLineUser.orgId}" />
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-form">

                                <!-- 头像 userPortraitUri -->
                                <div class="layui-form-item">
                                    <label class="layui-form-label">头像：</label>
                                    <div class="layui-input-inline avatar">
                                        <input type="hidden" name="userPortraitUri" />
                                        <img id="file_preview" th:src="${fastDfsAccessPath + defaultPortrait}" class="layui-upload-img" />
                                    </div>
                                    <button style="float: left;" type="button" class="layui-btn" id="file_upload">上传图片</button>
                                </div>
                                <!-- 姓名 userName -->
                                <div class="layui-form-item">
                                    <label class="layui-form-label">
                                        <span class="must">*</span>
                                        <span>姓名</span>
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="userName" lay-verify="specialCharacters|userName" autocomplete="off" class="layui-input w350">
                                    </div>
                                </div>
                                <!-- 归属机构 orgId -->
                                <div class="layui-form-item">
                                    <label class="layui-form-label">
                                        <span class="must">*</span>
                                        <span>归属机构</span>
                                    </label>
                                    <div class="layui-input-inline">
                                        <div id="org_name" class="w350"></div>
                                        <input name="orgId" lay-verify="required" type="hidden" />
                                    </div>
                                </div>
                                <!-- 登录名 loginName -->
                                <div class="layui-form-item">
                                    <label class="layui-form-label">
                                        <span class="must">*</span>
                                        <span>登录名</span>
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="loginName" lay-verify="specialCharacters|loginName" autocomplete="off" class="layui-input w350">
                                    </div>
                                </div>
                                <!-- 电话 userMobile -->
                                <div class="layui-form-item">
                                    <label class="layui-form-label">
                                        <span class="must">*</span>
                                        <span>电话</span>
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="userMobile" lay-verify="phone" autocomplete="off" class="layui-input w350">
                                    </div>
                                </div>
                                <!-- 密码 loginPwd -->
                                <div class="layui-form-item">
                                    <label class="layui-form-label">
                                        <span class="must">*</span>
                                        <span>密码</span>
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="password" name="loginPwd" lay-verify="password" id="old_password" autocomplete="off" class="layui-input w350">
                                    </div>
                                </div>
                                <!-- 确认密码 confirmLoginPwd -->
                                <div class="layui-form-item">
                                    <label class="layui-form-label">
                                        <span class="must">*</span>
                                        <span>确认密码</span>
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="password" name="confirmLoginPwd" lay-verify="password|confirmPwd" autocomplete="off" class="layui-input w350">
                                    </div>
                                </div>
                                <!-- 用户角色 -->
                                <div class="layui-form-item">
                                    <label class="layui-form-label">
                                        <span class="must">*</span>
                                        <span>用户角色</span>
                                    </label>
                                    <div class="layui-input-block" id="role_list"></div>
                                </div>
                                <!-- 备注 -->
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">备注</label>
                                    <div class="layui-input-block">
                                        <textarea name="remark" class="layui-textarea w500"></textarea>
                                    </div>
                                </div>
                                <!-- 按钮 -->
                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <button id="submit_btn" class="layui-btn" lay-submit lay-filter="entity_insert_filter">提交</button>
                                        <button type="reset" class="layui-btn layui-btn-primary">取消</button>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </body>


    <!-- javascript -->
    <script type="text/javascript" th:src="@{'/layui/layui.js'}"></script>
    <script type="text/javascript">
        layui.config({
            base: '/' //静态资源所在路径
        });
    </script>
    <script type="text/javascript" th:src="@{'/js/permissions/account-add.js'}"></script>
</html>