<div id="calls" style="width:98%; margin:15px auto;" ms-controller="Calls">
<table border="0" align="center" cellpadding="0" cellspacing="0" style="width:100%;">
        <tbody>
        <tr>
            <td width="256" valign="top" ms-visible="!showOnlyList">
                <div class="boxTitlenoneb boxTitle">
                    <h2>按登记员工找来电</h2>
                    <div class="input-append">
                        <input id="employeeName" ms-duplex="empkey" type="text" style="width: 172px; margin-left: 10px; font-size: 12px; color: #989898;" placeholder="请输入员工姓名">
                        <button class="add-on ibtsearch" style="height: 28px; font-size: 12px; padding: 3px 12px;" ms-click="empSearch">搜索</button>
                    </div>
                    <div style="height: 404px; overflow: auto;">
                       <ul id="empTree" class="ztree"></ul>
                    </div>
                </div>
                <div class="clearfix">
                </div>
                <div class="boxTitle top10">
                    <h2>来电日历</h2>
                    <table><tr><td id="jscalender"></td></tr></table>
                </div>
            </td>
            <td width="12" valign="top" ms-visible="!showOnlyList">
                &nbsp;
            </td>
            <td width="256" valign="top" bgcolor="#FFFFFF" class="bordergrag" ms-visible="!showOnlyList">
                <div class="boxTitlenoneb">
                    <h2>最近来电客户</h2>
                    <div class="input-append">
                        <input ms-duplex="cuskey" type="text" style="width: 172px; margin-left: 10px; font-size: 12px; color: #989898;" placeholder="请输入客户名称">
                        <button class="add-on ibtsearch" style="height: 28px; font-size: 12px; padding: 3px 12px;" ms-click="cuskeyClick">搜索</button>
                    </div>
                    <div style="border-top: #D2D2D2 solid 1px; overflow: hidden;" class="folderbox">
                        <ul ms-each-item="groupList">
                            <li><a href="javascript:void(0);" ms-click="groupClick" ms-title="item.CustomerName">{{item.CustomerName|truncate(11,'..')}}</a><span class="time">{{item.CallsTime|truncate(10,'')}}</span></li>
                        </ul>
                    </div>
                </div>
            </td>
            <td width="12" valign="top" ms-visible="!showOnlyList">&nbsp;</td>
            <td valign="top">
                <div class="boxTitle bottom10" ms-visible="!showOnlyList">
                    <h2>分类检索</h2>
                    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="seacrhTable">
                        <tbody><tr>
                            <td width="460" class="searchico">
                                <div class="input-append" style="margin-bottom: 0px;">
                                    <input type="text" class="span4" ms-duplex="keyword" placeholder="请输入联系人姓名或联系方式等关键字">
                                    <button class="add-on ibtsearch" type="button" ms-click="search" style="height: 28px; font-size: 12px; padding: 3px 12px;">搜索</button>
                                    <button class="add-on ibtsearch clearall" type="button" ms-click="clear" style="height: 28px; font-size: 12px; padding: 3px 12px;">显示全部</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}}</a>
                                      </span>
                                </div>
                            </td>
                        </tr>
                    </tbody></table>
                    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="seacrhField">
                        <tbody ms-each-search="searchItem">
                        <tr>
                            <td colspan="2" >
                                <span>{{search.title}}</span>
                                <div style="display: inline;" ms-each-item="search.item">
                                    <a href="javascript:void(0)" ms-value="{{item.value}}" ms-class-selected="item.focus" ms-click="item.click" ms-attr-sort="search.sort" ms-attr-index="$index">{{item.key}}</a>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                        <tr>
                            <td colspan="2" class="seabox"><span class="first">筛选条件：</span>
                                <div style="display: inline;">
                                    <span class="searchItem" ms-if="showItem.dateName!=''">{{showItem.dateName}}<i><a href="javascript:void(0)" val="date" ms-click="remove"></a></i></span>
                                    <span class="searchItem" ms-if="showItem.timeName!=''">{{showItem.timeName}}<i><a href="javascript:void(0)" val="time" ms-click="remove"></a></i></span>
                                    <span class="searchItem" ms-if="showItem.keyName!=''">{{showItem.keyName}}<i><a href="javascript:void(0)" val="key" ms-click="remove"></a></i></span>
                                    <span class="searchItem" ms-if="showItem.statusName!=''">{{showItem.statusName}}<i><a href="javascript:void(0)" val="status" ms-click="remove"></a></i></span>
                                    <span class="searchItem" ms-if="showItem.categoryName!=''">{{showItem.categoryName}}<i><a href="javascript:void(0)" val="category" ms-click="remove"></a></i></span>
                                    <span class="searchItem" ms-if="showItem.empName!=''">{{showItem.empName}}<i><a href="javascript:void(0)" val="emp" ms-click="remove"></a></i></span>
                                    <span class="searchItem" ms-if="showItem.customer!=''">{{showItem.customer}}<i><a href="javascript:void(0)" val="customer" ms-click="remove"></a></i></span>
                                </div>
                                <span class="last" ms-if="showItem.keyName!='' || showItem.statusName!='' || showItem.categoryName!='' || showItem.dateName!='' || showItem.timeName!='' || showItem.empName!=''">
                                    <a href="javascript:void(0)" ms-click="clear">清除所有</a>
                                </span>
                            </td>
                        </tr>
                    </table>
                </div>
                 
                <!--来电列表-->
                <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList" style="border-bottom:0px;">
                    <thead>
                        <tr class="dobtn">
                            <td colspan="9" bgcolor="#FFFFFF" style="position:relative;">
                                <a href="javascript:void(0);" ms-if="ADD" class="doadd" ms-click="doadd">新增</a> 
                                <a href="javascript:void(0);" ms-if="DELETE" class="doalldel" ms-click="doalldel">批量删除</a>
                                <span style="float:right; ">
                                    <a href="javascript:void(0);" class="custom" ms-click="docustom">自定义显示</a><!--自定义列--> 
                                </span>
                                  <!--自定义列-->
                                    <div class="cb_custom" style="display:none; position:absolute;top:40px; right:0px;">
                                        <div class="cb_warp">
                                            <ul class="cb_ul">
                                                <li ms-repeat-item="customList">
                                                    <label class="cb_label"><input type="checkbox" class="pad10" ms-duplex-radio="item.checked" />{{item.name}}</label>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                            </td>
                        </tr>
                        <tr class="head">
                            <th ms-visible="customList[0].checked" align="center" ><input type="checkbox" class="checkAll"></th>
                            <th ms-visible="customList[1].checked" align="center" >分类</th>
                            <th ms-visible="customList[2].checked" align="center" >来电号码</th>
                            <th ms-visible="customList[3].checked" align="center" >联系人</th>
                            <th ms-visible="customList[4].checked" align="center" >来电内容</th>
                            <th ms-visible="customList[5].checked" align="center" >状态</th>
                            <th ms-visible="customList[6].checked" align="center" >来电时间</th>
                            <th ms-visible="customList[7].checked" align="center" >操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr class="dobody" ms-repeat-item="callsList">
                            <td ms-visible="customList[0].checked"><input type="checkbox" name="checkbox" ms-value="{{item.Id}}"></td>
                            <td ms-visible="customList[1].checked">{{item.ClassDicId|dicname}}</td>
                            <td ms-visible="customList[2].checked">{{item.CallsMobile|mobileFormat|html}}</td>
                            <td ms-visible="customList[3].checked">{{item.CallsName}}</td>
                            <td ms-visible="customList[4].checked" style="text-align:left" style="padding-left:6px;">
                                <a href="javascript:void(0);" class="showview" ms-click="doview(item.Id)">{{item.CallsContent|truncate(14,"…")}}</a>
                            </td>
                            <td ms-visible="customList[5].checked"><span ms-class="{{statusIcon(item.Status)}}" ms-title="{{statusTitle(item.Status)}}"></span></td>
                            <td ms-visible="customList[6].checked">{{item.CallsTime}}</td>
                            <td ms-visible="customList[7].checked">
                                <a href="javascript:void(0);" class="doview" title="详细" ms-click="doview(item.Id)"></a>
                                <a href="javascript:void(0);" ms-if="item.EDIT" class="doedit" title="编辑" ms-click="doedit(item.Id)"></a>
                                <a href="javascript:void(0);" ms-if="!item.EDIT" title="非常抱歉，您没有编辑的权限"  class="noedit"></a>
                                <a href="javascript:void(0);" ms-if="item.DELETE" class="dodel" title="删除" ms-value="item.Id" ms-attr-index="$index" ms-click="dodel"></a>
                                <a href="javascript:void(0);" ms-if="!item.DELETE" title="非常抱歉，您没有删除的权限" class="nodelete"></a>
                            </td>
                        </tr>
                    </tbody>
                    <tfoot>
                        <tr ms-if="grid1.gridmsg">
                            <td colspan="9" class="gridmsg">{{grid1.gridmsg|html}}</td>
                        </tr>
                        <tr>
                            <td colspan="9" ms-widget='paging,upaing,userpaing'></td>
                        </tr>
                    </tfoot>
                    </table>
            </td>
        </tr>
        </tbody>
</table>
</div>
