<div class="listview">
    <div class="row">
        <div class="col-sm-1">
            <rt-button id="btnClose" rt-style="link" rt-title="关闭" rt-icon="times" ng-click="vm.actions.close($event)"></rt-button>
        </div>
    </div>

    <div class="row">
        <form ng-class="col-sm-12">
            <div class="input-group" style="padding-left: 15px;padding-right: 15px;">
                <input type="search" placeholder="搜索..." class="form-control" ng-model="vm.view.searchText" />
                <span class="input-group-btn" ng-click="vm.view.search(1)">
                    <button type="submit" class="btn btn-default">
                        <i class="fa fa-search"></i>
                    </button>
                </span>
            </div>
            <!--<div class="btn-group" style="padding-left: 15px;margin-top: 6px;">
                <button class="btn btn-default dropdown-toggle" id="dropdownMenuViewSelect" data-toggle="dropdown"
                        aria-haspopup="true" aria-expanded="false">
                    {{vm.selectedaccType.name}}
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu" aria-labelledby="dropdownMenuViewSelect">
                    <li ng-repeat="view in vm.accType track by view.id" ng-click="vm.actions.chooseTab($index)"><a
                            href="javascript:void(0)">{{view.name}}</a></li>
                </ul>
            </div>-->
            <div class="button-bar rt-status-bar">
                <button class="button button-small" ng-click="vm.actions.chooseTab(0)" ng-class="{active:vm.selectedaccType.id=='account'}">
                    协议代理商
                </button>
                <button class="button button-small" ng-click="vm.actions.chooseTab(1)" ng-class="{active:vm.selectedaccType.id=='leads'}">
                    潜在代理商
                </button>
            </div>
            <div class="viewlist">
                <rt-data-grid style="margin-bottom:35px;" rt-page-record-count="vm.page.recordCount" rt-page-index="vm.page.index" rt-page-size="vm.page.size" rt-get-data="vm.view.search()" rt-sort-field="vm.view.sortField" rt-rows="vm.data" rt-selected-ids="vm.view.selectedIds" rt-is-single-selected="true"
                    rt-auto-height="{{vm.view.autoHeight}}">
                    <table class="table table-condensed table-hover">
                        <thead>
                            <tr>
                                <th ng-repeat="col in vm.colList">{{col.Name}}</th>
                                <th></th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ng-repeat="row in vm.data track by row.Id">
                                <td ng-repeat="col in vm.colList">
                                    <span ng-if="col.Format=='number:0'">{{row[col.Code] | number:0}}</span>
                                    <span ng-if="col.Format=='number:1'">{{row[col.Code] | number:1}}</span>
                                    <span ng-if="col.Format=='number:2'">{{row[col.Code] | number:2}}</span>
                                    <span ng-if="col.Format=='yyyy-MM-dd HH:mm'">{{row[col.Code] | date: 'yyyy-MM-dd HH:mm'}}</span>
                                    <span ng-if="col.Format=='yyyy-MM-dd'">{{row[col.Code] | date: 'yyyy-MM-dd'}}</span>
                                    <span ng-if="!col.Format">{{row[col.Code]}}</span>
                                </td>
                                <td>
                                    <rt-data-checkbox value="{{row['Id']}}" ng-hide="true"></rt-data-checkbox>
                                    <button class="btn btn-link" ng-click="vm.actions.select(row)">选择</button>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </rt-data-grid>
            </div>
        </form>
    </div>
</div>