<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="selectdept.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.telmanage.selectdept" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <script src="../scripts/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../scripts/ui/json2.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/core/base.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
    <link href="../scripts/ui/skins/Tab/css/tab.css" rel="stylesheet" type="text/css" />
    <link href="../scripts/ui/skins/Tab/css/grid.css" rel="stylesheet" type="text/css" />
    <script src="../scripts/ui/js/plugins/ligerGrid.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/plugins/ligerLayout.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/plugins/ligerTree.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/plugins/ligerMenu.js" type="text/javascript"></script>
    <script src="../scripts/CustomersData.js" type="text/javascript"></script>
    <link href="../scripts/ui/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
    <link href="../images/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function Init() {
            try {
                var trees1 = $("#tree1").ligerTree({
                    nodeWidth: 135,
                    checkbox: false,
                    isExpand: false,
                    url: '../sysmanage/ajax/deptcategory.ashx?action=gettreelist', onClick: function (node) {
                        document.getElementById("selectDept").innerHTML = node.data.text;
                        document.getElementById("hfDeptId").value=node.data.id;
                    }
                });
            }
            catch (e) { alert(e.message); }
        }
        function selectdept() {
            parent.SelectJDDept(document.getElementById("hfDeptId").value, document.getElementById("selectDept").innerHTML);
            CloseThis();
        }
        function CloseThis() {
            var dialog = frameElement.dialog;
            dialog.close();
        }
    </script>
</head>
<body onload="Init();">
    <form id="form1" runat="server"><asp:HiddenField ID="hfDeptId" Value="" runat="server"></asp:HiddenField>
    <div id="divInfo" style="width:100%; height:35px;"><table class="form_table">
                <col width="85px" />
                <col />
                <col width="85px" />
                <tbody>
                    <tr>
                        <th>
                            选择部门：
                        </th>
                        <td>
                            <span id="selectDept" style=" color:Red;"></span>
                        </td>
                        <td><input id="btnMore" type="button" value="确 定" class="btnSearch" onclick="selectdept();" />
                        </td>
                    </tr>
                </tbody>
            </table>
    </div>
    <div id="divtree" style="width:100%; height:280px; padding-top:5px; overflow:auto;">
    <ul id="tree1">
            <li isexpand="false" id="-1"><span>部门信息</span>
                <ul>
                </ul>
            </li>
        </ul>
        </div>
    </form>
</body>
</html>
