<table border="0" align="center" cellpadding="0" cellspacing="0" ms-controller="RecycleBinCustomer" id="mian">
    <tbody>
        <tr>
            <!--leftNav-->
            <td width="198" height="450" valign="top" id="tdleft">
                <div id="left" ms-widget="leftMenu,advertisingMenu">
                </div>

                <!--End leftNav-->
            </td>
            <!--leftNav end-->


            <!--rightNav-->
            <td valign="top" id="right" class="addrightbg">
                  <div class="boxTitle" style="margin-top:10px; padding:10px;">
                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="seacrhTable" style="background: none;">
                        <tbody>
                            <tr>
                                <td width="460" class="searchico">
                                    <div class="input-append" style="margin-bottom: 10px;">
                                        <input type="text" class="span4" ms-duplex="queryData.key.val" placeholder="请输入客户名称" ms-enter="grid1.doSearch">
                                        <button class="add-on ibtsearch" type="button" style="height: 28px; font-size: 12px; padding: 3px 12px;" ms-click="grid1.doSearch">搜索</button>
                                        <button class="add-on ibtsearch clearall" type="button" style="height: 28px; font-size: 12px; padding: 3px 12px;" ms-click="clearQuery">显示全部</button>
                                    </div>
                                </td>
                                <td class="fgray"><!--{{lang.SearchHistory}}
                                   <span class="bindSearchHistory" ms-repeat-h='queryHistory'>
                                       <a href="javascript:void(0)" ms-click='addQuery(h.name,h.val,h.label)' ms-title='h.label'>{{h.label|truncate(10)}}</a>
                                   </span>-->
                                </td>
                            </tr>
                        </tbody>
                    </table>
                <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="seacrhField">
                    <tbody>
                        <tr ms-class="quickword {{$val.hide?'hide':''}}" ms-repeat="queryData" ms-if-loop="$val.items && !$val.jump">
                            <td ms-attr-colspan="$val.next?1:2" ms-width="$val.next?'50%':'100%'">
                                <span>{{$val.label}}</span>
                                <div style="display: inline;" ms-each-r='$val.items'>
                                    <a href="javascript:void(0)" ms-if="!r.type" ms-click='addQuery($key, r.val, r.label)' ms-class-selected="r.curr" ms-html='r.label'></a>
                                    <a href="javascript:void(0)" ms-if="r.type=='areaTree'" ms-click="showTree(true,r,$event)" ms-class-selected="r.curr" ms-html='r.label'></a>
                                    <a href="javascript:void(0)" ms-if="r.type=='selectUser'" ms-click="selectUser($key,r)" ms-class-selected="r.curr" ms-html='r.label'></a>
                                    <a href="javascript:void(0)" ms-if="r.type=='date'" ms-click='addQuery($key, r.val, r.label)' ms-class-selected="r.curr" ms-html='r.label'></a>
                                    <div ms-if="r.type=='date'" ms-visible="queryData[$key].val==r.val">
                                        <input type="text" ms-duplex="queryData[r.d1].val" ms-widget="date" ms-attr-data-format="r.format" style="width: 80px; height: 15px; margin-left: 10px;" readonly="readonly" />
                                        <label ms-if="r.d2" style="margin-left: -15px;">至</label>
                                        <input ms-if="r.d2" type="text" ms-duplex="queryData[r.d2].val" ms-widget="date" ms-attr-data-format="r.format" style="width: 80px; height: 15px;" readonly="readonly" />
                                    </div>
                                </div>
                            </td>
                            <td ms-if="$val.next" width="50%">
                                <span>{{queryData[$val.next].label}}</span>
                                <div style="display: inline;"ms-each-r="queryData[$val.next].items">
                                    <a href="javascript:void(0)" ms-if="!r.type" ms-click='addQuery($val.next, r.val, r.label)' ms-class-selected="r.curr" ms-html='r.label'></a>
                                    <a href="javascript:void(0)" ms-if="r.type=='areaTree'" ms-click="showTree(true,r,$event)" ms-class-selected="r.curr" ms-html='r.label'></a>
                                    <a href="javascript:void(0)" ms-if="r.type=='selectUser'" ms-click="selectUser($val.next,r)" ms-class-selected="r.curr" ms-html='r.label'></a>
                                    <a href="javascript:void(0)" ms-if="r.type=='date'" ms-click='addQuery($val.next, r.val, r.label)' ms-class-selected="r.curr" ms-html='r.label'></a>
                                    <div ms-if="r.type=='date'" ms-visible="queryData[$val.next].val==r.val">
                                        <input type="text" ms-duplex="queryData[r.d1].val" ms-widget="date" ms-attr-data-format="r.format" style="width: 80px; height: 15px; margin-left: 10px;" readonly="readonly" />
                                        <label ms-if="r.d2" style="margin-left: -15px;">至</label>
                                        <input ms-if="r.d2" type="text" ms-duplex="queryData[r.d2].val" ms-widget="date" ms-attr-data-format="r.format" style="width: 80px; height: 15px;" readonly="readonly" />
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr ms-if="queryMore">
                            <td colspan="2">
                                <ul class="quickwordul">
                                    <li>
                                        <div class="quickwordmore" isshow="flase" onclick="quickwordShow()">更多选项<span class="quickdown"></span></div>
                                    </li>
                                </ul>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" class="seabox">
                                <span class="first" ms-html='lang.CurrSearchCondition'></span>
                                <div style="display: inline; float: left;" ms-repeat="queryData">
                                    <span class="searchItem" ms-if-loop='$val.valLabel'>{{$val.valLabel}}
                                        <i><a href="javascript:void(0)" ms-click='removeQuery($key)'></a></i>
                                    </span>
                                </div>
                                <span class="last" ms-visible='hasQuery' ms-click='clearQuery'><a href="javascript:void(0)" ms-html='lang.ClearAll'></a></span>
                            </td>
                        </tr>
                    </tbody>
                </table>
                </div>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable">
                    <tbody>
                        <tr>
                            <td>
                                <table width="100%" border="0" cellspacing="1" cellpadding="0" class="top10">
                    <tbody>
                        <tr>
                            <td width="356" valign="top">
                                        <!--Bottom-->
                <table width="100%" border="0" cellspacing="1" cellpadding="0" class="top10">
                    <tbody>
                        <tr>
                            <td width="356" valign="top">
                                <div class="boxTitlenob">
                                    <h2>用户列表
                                        <!--<span class="rseachbox">
                                            <input id="appendedInput" type="text" style="margin-bottom:0px;">
                                            <button class="inputbt" id="qSearch"></button>
                                        </span>-->
                                    </h2>
                                </div>
                                <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList">
                                    <thead>
                                        <tr class="dobtn">
                                            <td colspan="10">
                                                <a href="javascript:void(0)" ms-if="RESTORE" ms-click="doRestoreAll" class="dorestore">批量恢复</a>
                                                <a href="javascript:void(0)" ms-if="DELETE" ms-click="grid1.removeChecked(true,'确定要彻底删除选中的客户吗？','请选择要彻底删除的客户。')" class="doalldel">批量删除</a>
                                            </td>
                                        </tr>
                                        <tr class="head">
                                            <th style="width: 3%; text-align:center" >
                                                <input type="checkbox" ms-duplex-radio='grid1.checkall'>
                                            </th>
                                            <th style="width: 15%;">客户名称</th>
                                            <th style="width: 10%;">类型</th>
                                            <th style="width: 10%;">客户形态</th>
                                            <th style="width: 10%;">客户分类</th>
                                            <th style="width: 10%;">阶段</th>
                                            <th style="width: 10%;">归属人</th>
                                            <th style="width: 12%;">创建时间</th>
                                            <th style="width: 12%" class="auto-style1">删除时间</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr class="gridmsg" ms-if="grid1.gridmsg">
                                            <td colspan="10">{{grid1.gridmsg|html}}</td>
                                        </tr>
                                        <tr class="dobody" ms-repeat-item="grid1.list" ms-class-1="selected:item.checked">
                                            <td align="center">
                                                <input type="checkbox" name="checkbox" ms-duplex-radio='item.checked'></td>
                                            <td  style="text-align:left;">
                                                <a href="javascript:void(0)" ms-click="gotoview(item.Id)">{{item.Name}}</a>
                                            </td>
                                            <td style="text-align:center;">{{item.Type|customerType}}</td>
                                            <td style="text-align:center;">{{item.SuperiorCategoryDisplay}}</td>
                                            <td style="text-align:center;">{{item.CategoryDisplay}}</td>
                                            <td style="text-align:center;">{{item.StageDisplay}}</td>
                                            <td align="center">
                                                <a href="javascript:void(0);" ms-widget='userCard' ms-data-userid="item.Owner" ms-html='item.OwnerBy'></a>
                                            </td>
                                            <td align="center" ms-html='item.AddTime'></td>
                                            <td align="center" ms-html='item.RecycleTime'></td>
                                            <td class="auto-style1">
                                                <a href="javascript:void(0)" ms-click="doview(item)" class="doview" title="查看"></a>
                                                <a ms-if="item.RESTORE" href="javascript:void(0)" ms-click="doRestore(item,$index)"  class="dorestore" title="恢复"></a>
                                                <a href="javascript:void(0)" ms-if="item.DELETE" ms-click="grid1.remove(item,$index,true,'确定要彻底删此客户吗？')" class="dodel" title="彻底删除"></a>    
                                            </td>
                                        </tr>
                                    </tbody>
                                    <tfoot>
                                        <tr style="background-color: #fff;">
                                            <td colspan="10" ms-widget='paging' data-gridid="grid1"></td>
                                        </tr>
                                    </tfoot>
                                </table>
                            </td>
                        </tr>
                    </tbody>
                </table>
                            </td>
                        </tr>
                    </tbody>
                </table>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
    </tbody>
</table>
<!--查看模板-->
<noscript type="text/avalon" id="detailTemplate">
    <table width="800" border="0" cellspacing="0" cellpadding="0" class="titbox" style="margin-bottom: 10px; height: 30px;">
        <tr>
            <td width="68" height="30" class="tit">用户信息</td>
            <td>&nbsp;</td>
        </tr>
    </table>
    <table width="800" border="0" cellspacing="1" cellpadding="0" class="tablecInfo">
        <tbody>
            <tr>
                <td>姓名：</td>
                <td>{{userEntity.FullName}}</td>
                <td>默认角色：</td>
                <td>{{userEntity.Role.Name}}</td>
            </tr>
            <tr>
                <td width="80">部门：</td>
                <td>{{userEntity.Group.Name}}</td>
                <td width="80">职位：</td>
                <td>{{userEntity.PositionId|getpost}}</td>
            </tr>
            <tr>
                <td>状态：</td>
                <td>{{userEntity.IsAvailable ? '启用' : '禁用'}}</td>
                <td>性别：</td>
                <td>{{userEntity.Sex == 0 ? '男' : '女'}}</td>
            </tr>
            <tr>
                <td>电子邮箱：</td>
                <td>{{userEntity.Email}}</td>
                <td>手机：</td>
                <td>{{userEntity.Phone}}</td>
            </tr>
            <!--
            <tr>
                <td>录入人：</td>
                <td>{{userEntity.AddBy.FullName}}</td>
                <td>录入时间：</td>
                <td>{{userEntity.AddTime}}</td>
            </tr>-->
        </tbody>
    </table>
</noscript>