<div class="box box-primary">
    <div  class="box box-widget">
        <!-- form start -->
        <form class="form-horizontal">
            <div class="box-body">
                <div class="form-group">
                    <rt-picklist rt-title="数据来源" rt-col="3" rt-label-col="2" ng-model="vm.fromWebSite" rt-options="vm.picklist.odp_drugstore_crawler_source"></rt-picklist>
                    <rt-input rt-title="门店名称" rt-type="text" rt-col="3" rt-label-col="2" ng-model="vm.drugstorename"></rt-input>
                    <div class="btn-group" class="col-sm-2">
                        <button class="btn btn-primary" ng-click="vm.search(1)">查询</button>
                        <button class="btn btn-primary" ng-click="vm.gotoSyncPage();" style="margin-left: 20px;">数据同步</button>
                    </div>
                </div>
                <div class="form-group">
                    <rt-input rt-title="证书编号" rt-type="text" rt-col="3" rt-label-col="2" ng-model="vm.gspcode"></rt-input>
                </div>
            </div>
        </form>
    </div>
    <div class="nav-tabs-custom">
        <div class="tab-content">
            <rt-data-grid rt-page-record-count="vm.recordCount" rt-page-index="vm.pageIndex" rt-page-size="vm.pageSize" rt-get-data="vm.search()" rt-sort-field="vm.view.sortField"
                rt-rows="vm.data" rt-auto-height="vm.view.autoHeight">
                <table class="table table-condensed table-hover">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>数据来源</th>
                            <th>省市区</th>
                            <th>门店名称</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>{{ $index+1 }}</td>
                            <td>{{ row.odp_drugstore_crawler_source.Name}}</td>
                            <td>{{ row.provinceidName + (row.cityidName?row.cityidName:'') +(row.countyidName?row.countyidName:'') }}</td>
                            <td>{{ row.drugstoreidName}}</td>
                            <td>{{ row.gsp_code}}</td>
                            <td>{{ row.gsp_release_date|date:'yyyy-MM-dd' }}</td>
                            <td>{{ row.gsp_expire_date|date:'yyyy-MM-dd'  }}</td>
                            <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ row.address}}</td>
                            <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ row.remarks}}</td>
                            <td>{{ row.CreatedOn | date:'yyyy-MM-dd HH:mm:ss' }}</td>
                        </tr>
                    </tbody>
                </table>
            </rt-data-grid>
        </div>
    </div>
</div>

<div class="sidebar sidebar-right sidebar-animate rt-shadow-border-left content-wrapper" ng-if="vm.view.type=='default'">
    <div ui-view class="content"></div>
</div>