<style>

    td {
        border-top: 1px solid #ddd;
        line-height: 25px;
        padding: 5px 5px 5px 7px;
    }
    .point{
        color: #0099CC;
        font-weight: bold;
    }
</style>

<div class="bjui-pageContent">
    <form method="post" action="${ctxPath}/system/org/save" id="j_org_form" data-toggle="validate" data-autorefresh="true" data-alertmsg="false">
        <input TYPE="hidden" name="id" value="${org.id!}">
        <table cellspacing="1" cellpadding="6" border="0" width="100%">
            <tbody>
            <tr>
                <td>
                    <label for="j_username" class="control-label x85">部门名称：</label>
                    <input type="text" name="name" id="j_username" value="${org.name!,xss}" placeholder="请填写部门名称！" data-rule="required" size="
20" >
                </td>
            </tr>
            <tr>
                <td>
                    <label for="org" class="control-label x85">部门编码：</label>
                    <input type="text" name="code" id="org" value="${org.code!,xss}" placeholder="请填写部门名称！" data-rule="required" size="
20" >
                </td>
            </tr>
            <tr>
                <td>
                    <label for="j_username" class="control-label x85">父节点：</label>
                    <select name="pid" data-toggle="selectpicker">
                        ${selectOrganizationOut(org.pid!0,org.id!0)}
                    </select>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="telPhone" class="control-label x85">联系电话：</label>
                    <input type="text" name="telPhone" id="telPhone" value="${org.telPhone!,xss}" placeholder="请填写部门联系电话！"  size="
20" >
                </td>
            </tr>
            <tr>
                <td>
                    <label for="address" class="control-label x85">联系地址：</label>
                    <input type="text" name="address" id="address" value="${org.address!,xss}" placeholder="请填写部门联系地址！"  size="
20" >
                </td>
            </tr>
            </tbody>
        </table>

    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        @if(isEmpty(org.id)){
        <li><button type="submit" class="btn-default"  data-icon="save">保存</button></li>
        @}else{
        <li><button onclick="del(this)" type="button" class="btn-close" data-icon="close">删除</button></li>
        <li><button type="submit" class="btn-default"  data-icon="save">更新</button></li>
        @}
    </ul>
</div>
<script>
    function del(obj) {
        $(obj).bjuiajax('doAjax', {url:'${ctxPath}/system/org/delete?id=${org.id!}',confirmMsg:'子节点也会被删除，确定要删除该吗？'});
    }
    </script>