<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 class="col-sm-offset-3 col-sm-8 text-right">
            <rt-button id="btnConfirm" rt-style="link" rt-title="确认" rt-icon="check" ng-click="vm.actions.confirm($event)"></rt-button>
        </div>
    </div>
    <div class="row">
        <form class="col-sm-12">
            <div class="input-group">
                <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>
        </form>
    </div>
    <div class="viewlist">
        <rt-data-grid 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>#</th>
                        <th ng-repeat="col in vm.colList">{{col.Name}}</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="row in vm.data track by row.id">
                        <td>
                            <rt-data-checkbox value="{{row['id']}}" />
                        </td>
                        <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>
                    </tr>
                </tbody>
            </table>
        </rt-data-grid>
    </div>
</div>