<div ms-controller="postchange">
    <table border="0" align="center" cellpadding="0" cellspacing="0" id="mian">
        <tbody>
            <tr>
                <!--leftNav-->
                <td width="198" height="450" valign="top" id="tdleft">
                    <div id="left" ms-widget="leftMenu"></div>
                    <!--End leftNav-->
                </td>
                <td valign="top" id="right" class="">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="seacrhTable" id="seacrhTable" style="margin-top: 10px;">
                        <tbody>
                            <tr>
                                <td width="440" class="searchico">
                                    <div class="input-append" style="margin-bottom: 0px;">
                                        <input type="text" class="span4" placeholder="请输入姓名快速检索" ms-duplex="keyword">
                                        <button class="add-on ibtsearch" style="height: 28px; font-size: 12px; padding: 3px 12px;" ms-click="search">搜索</button>
                                        <button class="add-on ibtsearch" style="height: 28px; font-size: 12px; padding: 3px 12px;" ms-click="clear">显示全部</button>
                                    </div>
                                </td>
                                <td class="fgray">
                                    <span style="float: left;">历史搜索：</span>
                                    <div class="hotlist">
                                        <span class="bindSearchHistory" ms-each-item="history">
                                            <a href="javascript:void(0)" ms-value="item" ms-click="historyClick">{{item}}&nbsp;&nbsp;</a>
                                        </span>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" id="seacrhField" class="seacrhField">
                        <tbody>
                            <tr class="quickword">
                                <td colspan="2" width="50%">
                                    <span>生效时间</span>
                                    <div style="display: inline;">
                                        <a href="javascript:void(0)" class="selected" ms-click="itemClick" value="" key="signtime">不限</a>
                                        <a href="javascript:void(0)" ms-repeat-item="signtimeData" ms-live-click="itemClick" ms-value="item.Id" key="signtime">{{item.Data}}</a>
                                    </div>
                                </td>
                                <td colspan="2" width="50%">
                                    <span>录入时间</span>
                                    <div style="display: inline;">
                                        <a href="javascript:void(0)" class="selected" ms-click="itemClick" value="" key="endtime">不限</a>
                                        <a href="javascript:void(0)" ms-repeat-item="endtimeData" ms-live-click="itemClick" ms-value="item.Id" key="endtime">{{item.Data}}</a>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4" class="seabox"><span class="first">筛选条件：</span>
                                    <div style="display: inline;">
                                        <span class="searchItem" ms-if="showItem.signtime!=''">{{showItem.signtimename}}<i><a href="javascript:void(0)" val="signtime" ms-click="remove"></a></i></span>
                                        <span class="searchItem" ms-if="showItem.endtime!=''">{{showItem.endtimename}}<i><a href="javascript:void(0)" val="endtime" ms-click="remove"></a></i></span>

                                    </div>
                                    <span class="last" ms-if="showItem.signtime!='' || showItem.endtime!=''"><a href="javascript:void(0)" ms-click="clearAllItem">清除全部</a></span>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList bottom10" id="tableList">
                        <thead>
                            <tr class="dobtn" style="background-color: rgba(0, 0, 0, 0);">
                                <td colspan="12">
                                    <a ms-if="ADD" href="javascript:void(0)" class="doadd" ms-click="doadd">新增</a>
                                    <a ms-if="DELETE" href="javascript:void(0)" class="doalldel" ms-click="doalldel">批量删除</a>
                                </td>
                            </tr>
                            <tr class="head" style="background-color: rgba(0, 0, 0, 0);">
                                <td width="2%" align="center">
                                    <input type="checkbox" class="checkAll">
                                </td>
                                <td width="5%" align="center">姓名
                                </td>
                                <td width="5%" align="center">原部门
                                </td>
                                <td width="8%" align="center">原职位
                                </td>
                                <td width="5%" align="center">新部门
                                </td>
                                <td width="6%" align="center">新职位
                                </td>
                                <td width="5%" align="center">调动类别
                                </td>
                                <td width="6%" align="center">调动原因
                                </td>
                                <td width="5%" align="center">生效时间
                                </td>
                                <td width="6%" align="center">录入人
                                </td>
                                <td width="5%" align="center">录入时间
                                </td>
                                <td width="8%" align="center">操作
                                </td>
                            </tr>
                        </thead>
                        <tbody ms-each-item="postchangeList">
                            <tr align="center" ms-hover='hover'>
                                <td>
                                    <input type="checkbox" name="checkbox" ms-value="item.Id">
                                </td>
                                <td align="left"><a href='javascript:void(0);' ms-click="viewHr(item.EmployeeId)">{{item.EmployeeDisplay}}</a>
                                </td>
                                <td>{{item.OldDepartmentDisplay}}
                                </td>
                                <td>{{item.OldPostDisplay}}
                                </td>
                                <td>{{item.NewDepartmentDisplay}}
                                </td>
                                <td>{{item.NewPostDisplay}}
                                </td>
                                <td>{{item.CategoryDisplay}}
                                </td>
                                <td align="left"><a href="javascript:void(0)" ms-click="doview" ms-value="item.Id">{{item.Reason}}</a>
                                </td>
                                <td>{{item.ChangeDay | truncate(10,'')}}
                                </td>
                                <td>
                                    <a href="javascript:void(0)" ms-value="item.AddBy.Id" ms-widget='userCard' ms-data-userid="item.AddBy.Id">{{item.AddBy.FullName}}</a>
                                </td>
                                <td>{{item.AddTime | truncate(10,'')}}
                                </td>
                                <td>
                                    <a href="javascript:void(0)" class="doview" ms-click="doview" ms-value="item.Id" ms-title="查看"></a>
                                    <a ms-if="item.EDIT" href="javascript:void(0)" class="doedit" ms-click="doedit" ms-value="item.Id" ms-title="编辑"></a>
                                    <a ms-if="!item.EDIT" href="javascript:void(0)" class="noedit" ms-title="编辑"></a>
                                    <a ms-if="item.DELETE" href="javascript:void(0)" class="dodel" ms-click="dodel" ms-attr-index="$index" ms-value="item.Id" ms-title="删除"></a>
                                    <a ms-if="!item.DELETE" href="javascript:void(0)" class="nodel" ms-title="删除"></a>

                                </td>
                            </tr>
                        </tbody>
                        <tfoot>
                            <tr style="background-color: rgba(0, 0, 0, 0);">
                                <td colspan="12" ms-widget='paging,upaing,postchangepaing'></td>
                            </tr>
                        </tfoot>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
    <!---新增 and 编辑--->
    <noscript type="text/avalon" id="formTemplate">
        <table cellspacing="0" cellpadding="0" border="0" class="formTable" style="width:100%;">
            <tbody>
                <tr>
                    <td colspan="4" class="a-title">
                        <span>调动前</span>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" style="height: 5px;"></td>
                </tr>
                <tr>
                    <td height="25" width="90" align="right">员工姓名 ：
                    </td>
                    <td width="400">
                        <input type="hidden" ms-duplex="entity.EmployeeId" />
                        <input type="text" ms-duplex="entity.EmployeeDisplay" readonly="readonly" />
                        <button ms-visible="!haskey" ms-click="selectEmy()" type="button" class="myfbt"><i class="iadduser"></i></button>
                        <span class="must">*</span>
                    </td>
                    <td height="25" width="90" align="right">部门 ：
                    </td>
                    <td height="25" width="*" align="left">
                        <input type="hidden" ms-duplex="entity.OldDepartmentId" />
                        <input type="text" ms-duplex="entity.OldDepartmentDisplay" readonly="readonly" />
                    </td>
                </tr>
                <tr>
                    <td>工资级别待遇：</td>
                    <td>
                        <input type="text" ms-duplex="entity.OldSalary" readonly="readonly" />
                    </td>
                    <td height="25" width="90" align="right">职位 ：
                    </td>
                    <td height="25" width="*" align="left">
                        <input type="hidden" ms-duplex="entity.OldPostId" />
                        <input type="text" ms-duplex="entity.OldPostDisplay" readonly="readonly" />

                    </td>
                </tr>
                <tr>
                    <td colspan="4" class="a-title">
                        <span>调动后</span>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" style="height: 5px;"></td>
                </tr>
                <tr>
                <tr>
                    <td height="25" width="90" align="right">部门 ：
                    </td>
                    <td height="25" width="*" align="left">
                        <input type="hidden" ms-duplex="entity.NewDepartmentId" />
                        <input type="text" ms-duplex="entity.NewDepartmentDisplay" readonly="readonly" />
                        <button type="button" class="myfbt" ms-widget="dropDownGroupTree,newDepartmentTreeId,newDepartmentTreeOpts">
                            <i class="bm"></i>
                        </button>
                        <span class="must">*</span>
                    </td>
                    <td height="25" width="90" align="right">职位 ：
                    </td>
                    <td height="25" width="*" align="left">
                        <select ms-each-opt="posts" ms-duplex="entity.NewPostId">
                            <option ms-value="opt.Id" ms-text="opt.Name"></option>
                        </select>
                        <span class="must">*</span>
                    </td>
                </tr>
                <tr>
                    <td>工资级别待遇：</td>
                    <td>
                        <input type="text" ms-duplex="entity.NewSalary" />
                    </td>
                </tr>
                <tr>
                    <td colspan="4" class="a-title">
                        <span>调动信息</span>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" style="height: 5px;"></td>
                </tr>

                <tr>
                    <td height="25" width="90" align="right">调动类别 ：
                    </td>
                    <td height="25" width="*" align="left">
                        <label>
                            <input type="radio" ms-duplex-text="entity.Category" value="0">升级&nbsp;&nbsp;</label>
                        <label>
                            <input type="radio" ms-duplex-text="entity.Category" value="1">平级&nbsp;&nbsp;</label>
                        <label>
                            <input type="radio" ms-duplex-text="entity.Category" value="2">降级&nbsp;&nbsp;</label>
                    </td>
                    <td height="25" width="90" align="right">生效时间 ：
                    </td>
                    <td height="25" width="*" align="left">
                        <input type="text" ms-duplex="entity.ChangeDay" ms-widget="date,changedayid,changedayOpts" readonly="readonly" style="width: 120px" />
                        <span class="must">*</span>
                    </td>
                </tr>
                <tr>
                    <td height="25" align="right">调动原因 ：
                    </td>
                    <td height="25" width="*" align="left" colspan="3">
                        <textarea ms-duplex="entity.Reason" rows="2" cols="20" style="height: 80px; width: 90%;"></textarea><span class="must">*</span>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" class="a-title">
                        <span>系统信息</span>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" style="height: 5px;"></td>
                </tr>
                <tr>
                    <td height="25" width="90" align="right">录入人 ：
                    </td>
                    <td height="25" width="*" align="left">
                        <input ms-duplex="entity.AddBy.FullName" type="text" readonly="readonly" style="width: 100px;">
                    </td>
                    <td height="25" width="90" align="right">录入时间 ：
                    </td>
                    <td height="25" width="*" align="left">
                        <input ms-duplex="entity.AddTime" type="text" readonly="readonly" style="width: 100px;">
                    </td>
                </tr>
            </tbody>
        </table>
    </noscript>

    <!--查看-->
    <noscript type="text/avalon" id="viewTemplate">
        <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tablecInfo" id="info">
            <tbody>
                <tr>
                    <td colspan="4">
                        <span style="font-weight: bold;">调动前</span>
                    </td>
                </tr>
                <tr>
                    <td height="25" width="90" align="right">员工姓名 ：
                    </td>
                    <td width="400">{{entity.EmployeeDisplay}}
                    </td>
                    <td height="25" width="90" align="right">部门 ：
                    </td>
                    <td height="25" width="*" align="left">{{entity.OldDepartmentDisplay}}
                    </td>
                </tr>
                <tr>
                    <td>工资级别待遇：</td>
                    <td>{{entity.OldSalary}}
                    </td>
                    <td height="25" width="90" align="right">职位 ：
                    </td>
                    <td height="25" width="*" align="left">{{entity.OldPostDisplay}}
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <span style="font-weight: bold;">调动后</span>
                    </td>
                </tr>
                <tr>
                    <td height="25" width="90" align="right">部门 ：
                    </td>
                    <td height="25" width="*" align="left">{{entity.NewDepartmentDisplay}}
                    </td>
                    <td height="25" width="90" align="right">职位 ：
                    </td>
                    <td height="25" width="*" align="left">{{entity.NewPostDisplay}}
                    </td>
                </tr>
                <tr>
                    <td>工资级别待遇：</td>
                    <td colspan="3">{{entity.NewSalary}}
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <span style="font-weight: bold;">调动信息</span>
                    </td>
                </tr>
                <tr>
                    <td height="25" width="90" align="right">调动类别 ：
                    </td>
                    <td height="25" width="*" align="left">{{entity.CategoryDisplay}}
                    </td>
                    <td height="25" width="90" align="right">生效时间 ：
                    </td>
                    <td height="25" width="*" align="left">{{entity.ChangeDay|truncate(10,'')}}
                    </td>
                </tr>
                <tr>
                    <td height="25" align="right">调动原因 ：
                    </td>
                    <td height="25" width="*" align="left" colspan="3">{{entity.Reason}}
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <span>系统信息</span>
                    </td>
                </tr>
                <tr>
                    <td height="25" width="90" align="right">录入人 ：
                    </td>
                    <td height="25" width="*" align="left">{{entity.AddBy.FullName}}
                    </td>
                    <td height="25" width="90" align="right">录入时间 ：
                    </td>
                    <td height="25" width="*" align="left">{{entity.AddTime}}
                    </td>
                </tr>
            </tbody>
        </table>
    </noscript>

</div>
