<div ms-controller="communication">
    <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">
                    <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="categoryData" ms-live-click="itemClick" ms-value="item.Id" key="category">{{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="methodData" ms-live-click="itemClick" ms-value="item.Id" key="method">{{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.category!=''">{{showItem.categoryname}}<i><a href="javascript:void(0)" val="category" ms-click="remove"></a></i></span>
                                        <span class="searchItem" ms-if="showItem.method!=''">{{showItem.methodname}}<i><a href="javascript:void(0)" val="method" ms-click="remove"></a></i></span>

                                    </div>
                                    <span class="last" ms-if="showItem.category!='' || showItem.method!='' "><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="10">
                                    <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="5%" align="center">沟通类别
                                </td>
                                <td width="8%" align="center">沟通方式
                                </td>
                                <td width="5%" align="center">沟通地点
                                </td>
                                <td width="10%" align="center">沟通目的
                                </td>
                                <td width="5%" align="center">沟通负责人
                                </td>
                                <td width="5%" align="center">沟通时间
                                </td>
                                <td width="10%" align="center">操作
                                </td>
                            </tr>
                        </thead>
                        <tbody ms-each-item="communicationList">
                            <tr align="center" ms-hover='hover'>
                                <td>
                                    <input type="checkbox" name="checkbox" ms-value="item.Id">
                                </td>
                                <td><a href='javascript:void(0);' ms-click="viewHr(item.EmployeeId)">{{item.EmployeeDisplay}}</a>
                                </td>
                                <td align="left"><a href="javascript:void(0)" ms-click="doview" ms-value="item.Id">{{item.Subject}}</a>
                                </td>
                                <td>{{item.CategoryDisplay}}
                                </td>
                                <td>{{item.MethodDisplay}}
                                </td>
                                <td>{{item.Place}}
                                </td>
                                <td align="left">{{item.Target}}
                                </td>
                                <td>
                                    <a href="javascript:void(0)" ms-value="item.PersonInCharge" ms-widget='userCard' ms-data-userid="item.PersonInCharge">{{item.PersonInChargeDisplay}}</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="10" ms-widget='paging,upaing,communicationpaing'></td>
                            </tr>
                        </tfoot>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
    <!---新增 and 编辑--->
    <noscript type="text/avalon" id="formTemplate">
        <table cellspacing="0" cellpadding="0" width="100%" border="0" class="formTable">
            <tbody>
                <tr>
                    <td height="25" width="90" align="right">沟通负责人 ：
                    </td>
                    <td height="25" width="400" align="left">
                        <input type="hidden" ms-duplex="entity.PersonInCharge" />
                        <input type="text" ms-duplex="entity.PersonInChargeDisplay" readonly="readonly" />
                        <button ms-click="selectEmy(1)" type="button" class="myfbt"><i class="iadduser"></i></button>
                        <span class="must">*</span>
                    </td>
                    <td height="25" width="90" align="right" ms-visible="!haskey">沟通对象 ：
                    </td>
                    <td height="25" width="300" align="left" ms-visible="!haskey">
                        <input type="hidden" ms-duplex="entity.EmployeeId" />
                        <input type="text" ms-duplex="entity.EmployeeDisplay" readonly="readonly" />
                        <button ms-click="selectEmy(2)" type="button" class="myfbt"><i class="iadduser"></i></button>
                        <span class="must">*</span>
                    </td>
                </tr>
                <tr>
                    <td height="25" width="90" align="right">沟通类别 ：
                    </td>
                    <td height="25" width="400" align="left">
                        <select ms-duplex="entity.CategoryId" ms-each-item="categoryData">
                            <option ms-value="item.Id">{{item.Data}}</option>
                        </select>
                    </td>
                    <td height="25" width="90" align="right">沟通方式 ：
                    </td>
                    <td height="25" width="300" align="left">
                        <select ms-duplex="entity.MethodId" ms-each-item="methodData">
                            <option ms-value="item.Id">{{item.Data}}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td height="25" width="90" align="right">沟通时间 ：
                    </td>
                    <td height="25" width="*" align="left">
                        <input type="text" style="width: 120px;" ms-duplex="entity.Time" ms-widget="date,ctimeId,ctimedsfOpts" readonly="readonly" />
                        <span class="must">*</span>
                    </td>
                    <td height="25" width="90" align="right">沟通地点 ：
                    </td>
                    <td height="25" width="*" align="left">
                        <input ms-duplex="entity.Place" type="text" style="width: 206px;"><span class="must">*</span>
                    </td>
                </tr>
                <tr>
                    <td height="25" width="90" align="right">沟通主题 ：
                    </td>
                    <td height="25" width="*" align="left" colspan="3">
                        <input ms-duplex="entity.Subject" type="text" style="width: 206px;"><span class="must">*</span>
                    </td>

                </tr>
                <tr>
                    <td height="25" width="90" align="right">沟通目的 ：
                    </td>
                    <td height="25" width="*" align="left" colspan="3">
                        <input ms-duplex="entity.Target" type="text" style="width: 206px;">
                        <select id="seltarget" ms-change="settarget">
                            <option value="">快速选择</option>
                            <option value="调查">调查</option>
                            <option value="批评">批评</option>
                            <option value="表扬">表扬</option>
                            <option value="普通交流">普通交流</option>
                            <option value="违纪面试">违纪面试</option>
                            <option value="绩效管理">绩效管理</option>
                            <option value="离职">离职</option>
                        </select>
                        <span class="must">*</span>
                    </td>
                </tr>
                <tr>
                    <td height="25" width="105" align="right">沟通内容 ：
                    </td>
                    <td height="25" width="*" align="left" colspan="3">
                        <textarea id="txtContent"></textarea>
                    </td>
                </tr>
                <tr>
                    <td height="25" width="105" align="right">评语、决议：
                    </td>
                    <td height="25" width="*" align="left" colspan="3">
                        <textarea ms-duplex="entity.Comment" rows="2" cols="20" style="height: 80px; width: 95%;"></textarea>
                    </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 height="25" width="90" align="right">沟通负责人 ：
                    </td>
                    <td height="25" width="400" align="left">{{entity.PersonInChargeDisplay}}
                    </td>
                    <td height="25" width="90" align="right">沟通对象 ：
                    </td>
                    <td height="25" width="300" align="left">{{entity.EmployeeDisplay}}
                    </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.MethodDisplay}}
                    </td>
                </tr>
                <tr>
                    <td height="25" width="90" align="right">沟通时间 ：
                    </td>
                    <td height="25" width="*" align="left">{{entity.Time}}
                    </td>
                    <td height="25" width="90" align="right">沟通地点 ：
                    </td>
                    <td height="25" width="*" align="left">{{entity.Place}}
                    </td>
                </tr>
                <tr>
                    <td height="25" width="90" align="right">沟通主题 ：
                    </td>
                    <td height="25" width="*" align="left" colspan="3">{{entity.Subject}}
                    </td>

                </tr>
                <tr>
                    <td height="25" width="90" align="right">沟通目的 ：
                    </td>
                    <td height="25" width="*" align="left" colspan="3">{{entity.Target}}
                    </td>
                </tr>
                <tr>
                    <td width="105" align="right">沟通内容 ：
                    </td>
                    <td style="height: 150px;" align="left" colspan="3">{{entity.Content|html}}
                    </td>
                </tr>
                <tr>
                    <td height="25" width="105" align="right">评语、决议：
                    </td>
                    <td height="25" width="*" align="left" colspan="3">{{entity.Comment}}
                    </td>
                </tr>
            </tbody>
        </table>
    </noscript>
</div>
