<div ms-controller="hrorganizationController">
    <table border="0" align="center" cellpadding="0" cellspacing="0" id="mian">
        <tbody>
            <tr>
                <td width="198" height="450" valign="top" id="tdleft" style="border-bottom: #d2d2d2 1px solid;">
                    <div id="left" ms-widget="leftMenu">
                    </div>
                </td>
                <td width="10">&nbsp;</td>
                <td valign="top" bgcolor="#FFFFFF" height="1" style="vertical-align: top; width: 198px;">
                    <table cellpadding="0" cellspacing="0" height="100%" class="bordergrag top10 bottom10">
                        <tr>
                            <td style="vertical-align: top;">
                                <div class="boxTitlenoneb">
                                    <h2><a href="javascript:void(0)" ms-click="expanCategory" style="color: #016b96; float: right; margin-right: 5px; font-size: 12px; font-weight: normal;">- 收起</a>
                                        组织架构
                                    </h2>
                                    <ul id="organizationTree" ms-widget="groupTree,groupsTreeid,groupTreeOpts" class="ztree" style="width: 198px; overflow: auto;"></ul> 
                                    <br>
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
                <td valign="top" style="width: 10px;">&nbsp;
                </td>
                <td valign="top">
                    <div class="top10" style=" margin-bottom:10px;"> 
                        <table width="99%" border="0" cellspacing="1" cellpadding="0" class="tableList bottom10" style="margin-bottom: 1px;">
                            <thead>
                                <tr class="dobtn">
                                    <td colspan="7">
                                        <a href="javascript:void(0);" class="doadd" ms-click="doadd(0)" title="新增">新增</a> 
                                    </td>
                                </tr>
                                <tr class="head">
                                    <td width="3%" align="center">
                                        <input type="checkbox" class="checkAll">
                                    </td>
                                    <td width="20%" align="center">部门名称</td> 
                                    <td width="10%" align="center">部门定员</td>
                                    <td width="10%" align="center">现有职位</td>
                                    <td width="10%" align="center">在职员工</td>
                                    <td width="10%" align="center">录入时间</td>
                                    <td width="10%" align="center">操作</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ms-repeat-item="sublist">
                                    <td align="center">
                                        <input ms-if="item.Id!=1" type="checkbox" name="checkbox" ms-value="item.Id"></td>
                                    <td ms-if-loop="$first" style="font-weight: bold; padding-left: 5px;">{{item.Name}}
                                    </td> 
                                    <td ms-if-loop="!$first">
                                        <span ms-if-loop="!$last" class="treelevel2_1 treechildnode_1">&nbsp;</span>
                                        <span ms-if-loop="$last" class="treelevel2_1 treechildlastnode_1">&nbsp;</span>
                                        <span ms-if="!item.HasChildren">{{item.Name}}</span>
                                        <a href="javascript:void(0)" ms-click="getData(item.Id)" ms-if="item.HasChildren">{{item.Name}}</a>
                                    </td> 
                                    <td align="center">{{item.NumberOfPeoples}}</td>
                                    <td align="center"><a ms-href="'#/HR/HRPost/'+item.Id">{{item.PostNum}}</a></td>
                                    <td align="center"><a ms-href="'#/HR/Archive/'+item.Id+'/groupid'"> {{item.EmployeeNum}}</a> </td>
                                    <td align="center">{{item.AddTime}}</td>
                                    <td align="center">
                                        <span ms-if="item.Id!=1"> 
                                            <a href="javascript:void(0);" class="doadd" style="padding: 12px 10px;" title="新增子类"  ms-data-id ="item.Id" ms-data-name ="item.Name" ms-click="doadd"></a>
                                           &nbsp;&nbsp;<a href="javascript:void(0);" class="doview" ms-click="doview(item.Id)" title="查看"></a>
                                             <a class="doedit" ms-attr-title="lang.EditBtn" href="javascript:void(0)" ms-click="doedit(item.Id)"></a>
                                            <a href="javascript:void(0)" class="dodel" ms-attr-title="lang.DelBtn" ms-click="dodel(item.Id)"></a>
                                        </span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>

                </td>
            </tr>
        </tbody>
    </table>
    <!-- 新增或者修改-->
    <noscript id="formTemplate"> 
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable"> 
            <tr>
                <td width="98">部门名称：</td>
                <td width="330">
                    <input ms-duplex='groupEntity.Name' name="Name" type="text">
                    <span class="must">*</span></td>
                <td width="98">上级部门：</td>
                <td width="260">
                    <input ms-duplex='groupEntity.ParentGroupName' name="ParentGroup" type="text" readonly="readonly" id="ParentGroup" style="width: 206px;"><span>&nbsp;
                        <button onclick="" type="button" class="myfbt" ms-widget='dropDownGroupTree,inputGroupTree,inputGroupTreeOpts'><i class="bm"></i></button></span>

                </td>
            </tr> 
           <tr>
               <td>部门主管：</td>
               <td>
                     <input ms-duplex='groupEntity.ManagerDisplay' type="text" readonly="readonly" >
                        <button  ms-click='selectManager()' type="button" class="myfbt"><i class="iadduser"></i></button>
               </td>
               <td>分管领导：</td>
               <td>
                     <input ms-duplex='groupEntity.DeputyManagerDisplay' type="text" readonly="readonly">
                        <button  ms-click='selectDeputyManager()' type="button" class="myfbt"><i class="iadduser"></i></button>
               </td>
           </tr>
            <tr> 
                <td>部门定员：</td>
                <td colspan="3">
                    <input ms-duplex='groupEntity.NumberOfPeoples' name="NumberOfPeoples" type="text" id="NumberOfPeoples" />
                    <span class="must">*</span></td>
            </tr> 
            <tr>
                <td width="98">工作目标：</td>
                <td colspan="3">
                    <textarea ms-duplex='groupEntity.WorkTarget' name="Target" rows="2" cols="20" id="Target" style="height: 60px; width:92%;"></textarea>
                </td>
            </tr>
            <tr>
                <td width="98">工作职责与任务：</td>
                <td colspan="3">
                    <textarea ms-duplex='groupEntity.Responsibility' name="Responsibility" rows="2" cols="20" id="Responsibility" style="height: 60px; width: 92%;"></textarea>
                </td>
            </tr> 
            <tr>
                <td width="98">必备技能：</td>
                <td colspan="3">
                    <textarea ms-duplex='groupEntity.Skill' name="Skill" rows="2" cols="20" id="Skill" style="height: 60px; width: 92%;"></textarea>
                </td>
            </tr>
            <tr>
                <td width="98">相关培训课程：</td>
                <td colspan="3">
                    <textarea ms-duplex='groupEntity.Train' name="Train" rows="2" cols="20" id="Course" style="height: 60px; width: 92%;"></textarea>
                </td>
            </tr> 
    </table>
    </noscript>
     <!-- 查看-->
    <noscript id="viewTemplate"> 
     <table cellspacing="1" cellpadding="0" width="100%" border="0" class="tablecInfo">
            <tr>
                <td width="98">部门名称：</td>
                <td width="280">
                    {{groupEntity.Name}}
                <td width="98">上级部门：</td>
                <td width="280">
                    {{groupEntity.ParentGroupName}} 
                </td>
            </tr> 
           <tr>
               <td>部门主管：</td>
               <td>
                    {{groupEntity.ManagerDisplay}}
               </td>
               <td>分管领导：</td>
               <td>
                   {{groupEntity.DeputyManagerDisplay}}
               </td>
           </tr>
            <tr> 
                <td>部门定员：</td>
                <td colspan="3">
                    {{groupEntity.NumberOfPeoples}}</td>
            </tr> 
            <tr>
                <td width="98">工作目标：</td>
                <td colspan="3" style="height:60px;">
                    {{groupEntity.WorkTarget}}
                </td>
            </tr>
            <tr>
                <td width="98">工作职责与任务：</td>
                <td colspan="3" style="height:60px;">
                    {{groupEntity.Responsibility}}
                </td>
            </tr> 
            <tr>
                <td width="98">必备技能：</td>
                <td colspan="3" style="height:60px;">
                    {{groupEntity.Skill}}
                </td>
            </tr>
            <tr>
                <td width="98">相关培训课程：</td>
                <td colspan="3" style="height:60px;">
                    {{groupEntity.Train}}
                </td>
            </tr> 
    </table>
    </noscript>
    
</div>
