<div class="row">
<form class="form-horizontal">
    <div class="form-group">
        <rt-datetime ng-model="vm.yM" rt-type="year" rt-title="查询年份" rt-required="true" rt-col="3" rt-label-col="2">
        </rt-datetime>
        <rt-lookup2 rt-title="药品品类" ng-model="vm.proSelected" rt-get-data-name="Product.GetProductCategory"
                rt-order-by="name asc" rt-col-list="[{Code:'name',Name:'药品品类'}]"
                rt-col="3"
                rt-required="true"></rt-lookup2>
        <div class="col-sm-1">
            <button class="btn btn-primary" ng-click="vm.showReportButton()">查询</button>
        </div>
        <div class="col-sm-1">
            <button class="btn btn-primary" ng-click='vm.actions.export({},"HospitalSharereportExport","医院终端占有率分析")'>导出
            </button>
        </div>
</div>

<div class="form-group"> 
    <rt-lookup2 rt-title="省份" rt-multiple="true" ng-model="vm.priSelected" rt-get-data-name="Province.GetProvince"
                rt-order-by="name asc" rt-col-list="[{Code:'name',Name:'省份'}]"
                rt-col="8"></rt-lookup2>
</div>
</form>
</div>

<div class="row">
    <div class="col-sm-10">
        <div id="report1" style="height:800px;"ng-style="{ width: chartWidth + 'px' }"/>
    </div>
</div>

<div class="row" style="border-top: 1px dotted #d5c4c4; padding-top: 20px">

<div class="col-sm-30">
    <rt-data-grid rt-page-record-count="vm.recordCount" rt-get-data="vm.showReport()" rt-page-index="vm.index" rt-page-size="vm.pageSize" rt-rows="vm.reportData">
        <table class="table table-hover" style="white-space:nowrap;" id="rt-report-header">
<thead>
    <tr id="rt-report-header">
        <th class="rt-text-align">终端名称</th>
        <th class="rt-text-align">平均日门诊量</th>
        <th class="rt-text-align">平均患者比例</th>
        <th class="rt-text-align">平均取药金额</th>
        <th class="rt-text-align">科室床位数</th>
        <th class="rt-text-align">目标患者比例</th>
        <th class="rt-text-align">平均药品费用</th>
        <th class="rt-text-align">预估潜力金额（万元）</th>
        <th class="rt-text-align">实际销售额（万元）</th>
        <th class="rt-text-align">终端占有率</th>
    </tr>
</thead>
<tbody>
    <tr ng-repeat="row in vm.reportData">
        <!-- 判断数据为空时，将数据设置为“-” -->
        <td class="rt-text-align">
            {{row.toaccountidName==null ? "-" : row.toaccountidName}}
        </td>
        <td class="rt-text-align">
            {{row.data_a==null ? "-" : row.data_a}}
        </td>
        <td class="rt-text-align">
            {{row.data_r1==null ? "-" : row.data_r1}}
        </td>
        <td class="rt-text-align">{{row.data_p==null ? "-" : row.data_p}}</td>
        <td class="rt-text-align">{{row.data_b==null ? "-" : row.data_b}}</td>
        <td class="rt-text-align">
            {{row.data_r2==null ? "-" : row.data_r2}}
        </td>
        <td class="rt-text-align">
            {{row.data_c==null ? "-" : row.data_c}}
        </td>
        <td class="rt-text-align">
            {{row.capacity_amount==null ? "-" : row.capacity_amount}}
        </td>
        <td class="rt-text-align">{{row.saleto_total_price==null ? "-" : row.saleto_total_price}}</td>
        <td class="rt-text-align">{{row.share==null ? "-" : (row.share+"%")}}</td>
    </tr>
</tbody>
</table>
</rt-data-grid>
</div>
</div>