<div class="row">
    <form class="form-horizontal">
        <div class="form-group">
            <rt-datetime ng-model="vm.data_year" rt-type="year" rt-title="年份" rt-required="true" rt-col="3" rt-label-col="2"></rt-datetime>
            <label class="col-sm-2 control-label">药品</label>
            <div class="col-sm-3">
                <ui-select allow-clear ng-model="vm.product_categoryIdSelected" theme="bootstrap">
                    <ui-select-match>{{ $select.selected.name }}</ui-select-match>
                    <ui-select-choices repeat="item in vm.product_categoryIdList|filter:$select.search">
                        <span ng-bind-html="item.name | highlight: $select.search"></span>
                    </ui-select-choices>
                </ui-select>
            </div>
            <div class="col-sm-1">
                <button class="btn btn-primary" ng-click="vm.getReportData()">查询</button>
            </div>
            <div class="col-sm-1">
                <button class="btn btn-primary"
                        ng-click='vm.actions.export({},"ProvinceMarketOccupancyExport","区域市场占有率分析")'>导出
                </button>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">省份</label>
            <div class="col-sm-8">
                <ui-select class="form" multiple allow-clear sortable="true" theme="bootstrap" close-on-select="false" ng-model="vm.provinceIdSelected">
                    <ui-select-match>{{$item.name}}</ui-select-match>
                    <ui-select-choices repeat="item in vm.provinceIdList | filter: {name: $select.search}">
                        <span ng-bind-html="item.name | highlight: $select.search"></span>
                    </ui-select-choices>
                </ui-select>
            </div>
        </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">
    <rt-data-grid rt-page-record-count="vm.recordCount" rt-get-data="vm.getReportData()" rt-page-index="vm.pageIndex" rt-page-size="vm.pageSize"
                  rt-rows="vm.reportData">
        <table class="table table-condensed table-hover ng-scope" style="white-space: nowrap;" id="rt-report-header">
            <thead>
            <tr>
                <th class="rt-text-align">省市</th>
                <th class="rt-number-align">GDP（万元）</th>
                <th class="rt-number-align">人口（万人）</th>
                <th class="rt-number-align">发病率（每万人）</th>
                <th class="rt-number-align">平均治疗费用（元）</th>
                <th class="rt-number-align">潜力预估金额（万元）</th>
                <th class="rt-number-align">本年度销售额（万元）</th>
                <th class="rt-number-align">占有率</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="row in vm.reportData">
                <td class="rt-text-align">
                    {{row.provinceIdName}}
                </td>
                <td class="rt-number-align">
                    {{row.gdp}}
                </td>
                <td class="rt-number-align">
                    {{row.population}}
                </td>
                <td class="rt-number-align">
                    {{row.disease_rate}}
                </td>
                <td class="rt-number-align">{{row.avg_cost}}</td>
                <td class="rt-number-align">{{row.capacity_amount}}</td>
                <td class="rt-number-align">{{row.year_act_amount|toFixNumber:2}}</td>
                <td class="rt-number-align">{{row.occupancy|toFixNumber:2}}%</td>
            </tr>
            </tbody>
        </table>
    </rt-data-grid>
</div>