<div id="complaints" style="width: 98%; margin: 15px auto;" ms-controller="Complaints">
    <table border="0" align="center" cellpadding="0" cellspacing="0" width="100%">
        <tbody>
            <tr>
                <td width="256" valign="top" ms-if="!showOnlyList">
                    <div class="boxTitlenoneb boxTitle">
                        <h2>被投诉员工</h2>
                        <div class="input-append">
                            <input ms-duplex="empKey" type="text" style="width: 172px; margin-left: 10px; font-size: 12px; color: #989898;" placeholder="请输入员工姓名">
                            <button ms-click="empSearch" class="add-on ibtsearch" style="height: 28px; font-size: 12px; padding: 3px 12px;">搜索</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-if="!showOnlyList">&nbsp;</td>
                <td width="256" valign="top" ms-if="!showOnlyList" bgcolor="#FFFFFF" class="bordergrag">
                    <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 ms-click="cuskeyClick" class="add-on ibtsearch" style="height: 28px; font-size: 12px; padding: 3px 12px;">搜索</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" ms-attr-val="item.CustomerId">{{item.CustomerName|truncate(12,'..')}}</a><span class="time">{{item.BeginTime}}</span></li>
                            </ul>
                        </div>
                    </div>
                </td>
                <td width="12" valign="top" ms-if="!showOnlyList">&nbsp;</td>
                <td valign="top">
                    <div class="boxTitle bottom10" ms-if="!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.keyName!=''">{{showItem.keyName}}<i><a href="javascript:void(0)" val="key" 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.statusName!=''">{{showItem.statusName}}<i><a href="javascript:void(0)" val="status" ms-click="remove"></a></i></span>
                                        <span class="searchItem" ms-if="showItem.urgencyName!=''">{{showItem.urgencyName}}<i><a href="javascript:void(0)" val="urgency" 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.customerName!=''">{{showItem.customerName}}<i><a href="javascript:void(0)" val="customer" ms-click="remove"></a></i></span>
                                    </div>
                                    <span class="last" ms-if="showItem.keyName!=''||showItem.urgencyName!=''|showItem.statusName!=''|showItem.categoryName!=''|showItem.dateName!=''|showItem.empName!=''|showItem.customerName!=''">
                                        <a href="javascript:void(0)" ms-click="clear">清除所有</a>
                                    </span>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <!--投诉列表-->
                    <!--<div class="boxTitlenob top10">
                    <h2>投诉列表</h2>
                </div>-->
                    <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList  bottom10" id="tableList">
                        <thead>
                            <tr class="dobtn">
                                <td colspan="10" bgcolor="#FFFFFF">
                                    <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>
                                </td>
                            </tr>
                            <tr class="head">
                                <th align="center" style="width: 2%">
                                    <input type="checkbox" class="checkAll"></th>
                                <th align="center" style="width: 5%">分类</th>
                                <th align="center" style="width: 15%">投诉主题</th>
                                <th align="center" style="width: 5%" ms-visible="showCustomer">投诉客户</th>
                                <th align="center" style="width: 3%">程度</th>
                                <th align="center" style="width: 3%">状态</th>
                                <th align="center" style="width: 5%">投诉时间</th>
                                <th align="center" style="width: 5%">操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr class="dobody" ms-repeat-item="entityList">
                                <td>
                                    <input type="checkbox" name="checkbox" ms-value="{{item.Id}}"></td>
                                <td>{{item.ComplaintsType|servicesCategory}}</td>
                                <td style="text-align: left;"><a href="javascript:void(0);" ms-click="doview(item.Id)">{{item.Ttirle|truncate(15,".")}}</a></td>
                                <td style="text-align: left;" ms-visible="showCustomer">
                                    <a href='javascript:void(0)' ms-live-click="viewCustomer" ms-title='item.CustomerName'>{{item.CustomerName|truncate(13,".")}}
                                    </a>
                                </td>
                                <td>{{item.UrgencyLevel|servicesUrgency}}</td>
                                <td><span ms-class="{{statusIcon(item.Static)}}" ms-title="{{statusTitle(item.Static)}}"></span></td>
                                <td>{{item.BeginTime}}</td>
                                <td>
                                    <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-value="item.Id" ms-click="doedit"></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="10" class="gridmsg">{{grid1.gridmsg|html}}</td>
                            </tr>
                            <tr>
                                <td colspan="10" ms-widget='paging,upaing,userpaing'></td>
                            </tr>
                        </tfoot>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
</div>
