<div class="listview">
    <div class="row">
        <div class="col-sm-8">
            <div class="btn-group">
                <button class="btn btn-link" data-toggle="sidebar" data-target=".sidebar-right" ng-if="vm.view.type=='default'" ng-show="vm.privilege.IsCreate"
                    ui-sref=".edit({id:''})" ui-sref-opts="{location:true}">
                    <i class="fa fa-plus"></i> 新建
                </button>
                <button class="btn btn-link" ng-if="vm.view.type=='grid'" ng-click="vm.actions.showForm('','Module/SalesAgreementToAccountForLeads/salesagreementtoaccountForLeadsEditView.html','salesagreementtoaccountEditController')"
                    ng-show="vm.privilege.IsCreate">
                    <i class="fa fa-plus"></i> 新建
                </button>
                <button class="btn btn-link" ng-click="vm.actions.del()" ng-show="vm.privilege.IsDelete">
                    <i class="fa fa-trash"></i> 删除
                </button>
            </div>
        </div>
        <form class="col-sm-4">
            <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[.row]-->
    <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-auto-height="vm.view.autoHeight">
            <table class="table table-condensed table-hover">
                <thead>
                    <tr>
                        <th>
                            <rt-header-checkbox></rt-header-checkbox>
                        </th>
                        <!-- @@ 视图表头 -->
                        <th>查看</th>
                        <th rt-field-code="cityidName">所在地</th>
                        <th rt-field-code="accountidName">医院名称</th>
                        <th>医院级别</th>
                        <th>上年度销量</th>
                        <th>进院时间</th>
                        <th>年度任务</th>
                        <th>佣金比例</th>
                        <th>学术费率</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-if="vm.view.type=='default'">
                            <a id="{{row.Id}}" data-toggle="sidebar" data-target=".sidebar-right" ui-sref=".edit({id:row.Id})" ui-sref-opts="{location:true}">查看</a>
                        </td>
                        <td ng-if="vm.view.type=='grid'">
                            <a href="javascript:;" ng-click="vm.actions.showForm(row.Id,'Module/SalesAgreementToAccountForLeads/salesagreementtoaccountForLeadsEditView.html','salesagreementtoaccountEditController')">查看</a>
                        </td>
                        <td> {{row.cityid.Name}}</td>
                        <td>{{row.accountid.Name}}</td>
                        <td>{{row.account_grade.Name}}</td>
                        <td>{{row.last_year_sale_qty}}</td>
                        <td>{{row.salein_date|date:'yyyy-MM-dd'}}</td>
                        <td>{{row.year_target}}</td>
                        <td>{{row.commission_rate}}</td>
                        <td>{{row.academic_fees_rate}}</td>
                    </tr>
                </tbody>
            </table>
        </rt-data-grid>
        <!-- rt-data-grid  -->
    </div>
    <!-- div[.panel-default] -->
</div>
<!-- div[.listview] -->

<div class="editview borderShadow sidebar sidebar-right sidebar-animate" ng-if="vm.view.type=='default'">
    <div ui-view class="content"></div>
</div>
<!-- div[.editview] -->