<div class="box box-primary">
    <div class="box-header with-border">
        <h3 class="box-title">筛选</h3>
        <div class="box-tools pull-right">
            <button type="button" class="btn btn-box-tool" data-widget="collapse">
                <i class="fa fa-minus"></i>
            </button>
        </div>
    </div>
    <form class="form-horizontal">
        <div class="box-body">
            <div class="form-group">
                <div class="col-sm-11.5">
                    <rt-lookup2 rt-title="医院" ng-model="vm.accSelected" rt-get-data-name="Account.GetHospital" rt-order-by="name asc" rt-col-list="[{Code:'name',Name:'医院'},{Code:'accountnumber',Name:'编号'}]" rt-col="8"></rt-lookup2>
                </div>
            </div>

            <div class="form-group">
                <rt-datetime ng-model="vm.sYm" rt-type="month" rt-title="开始年月" rt-required="true" rt-col="3" rt-label-col="2"></rt-datetime>
                <rt-datetime ng-model="vm.eYm" rt-type="month" rt-title="结束年月" rt-required="true" rt-col="3" rt-label-col="2"></rt-datetime>
            </div>

            <div class="form-group">
                <div class="col-sm-11.5">
                    <rt-bu-tree-lookup rt-title="部门筛选" rt-multiple="true" ng-model="vm.nodeSelected" rt-col="8" rt-label-col="2"></rt-bu-tree-lookup>
                </div>
            </div>
        </div>

        <div class="box-footer">
            <div class="btn-group pull-right">
                <button class="btn btn-primary" ng-click="vm.getReportData()">查询</button>
                <button class="btn btn-default" ng-click='vm.actions.export({
                "year_month":"统计年月",
                "accountidName":"医院",
                "expense_a":"费用类型A",
                "expense_b":"费用类型B",
                "expense_d":"费用类型D",
                "invest":"投入",
                "complete_forehead":"达成额",
                "expense_rate":"费效比" 
               },"HospitalCostEffectivenessExport","医院费效比分析报表")'>导出</button>
            </div>
        </div>
    </form>
</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-page-index="vm.pageIndex" rt-page-size="vm.pageSize" rt-get-data="vm.getReportData()" rt-rows="vm.reportData" rt-auto-height="{{tableMaxHeight}} ">
            <table class="table table-condensed table-hover ng-scope" style="white-space:nowrap;" id="rt-report-header">
                <thead>
                    <tr>
                        <th class="rt-align-left">统计年月</th>
                        <th class="rt-align-left">医院</th>
                        <th class="rt-number-align">费用类型A</th>
                        <th class="rt-number-align">费用类型B</th>
                        <th class="rt-number-align">费用类型D</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>{{row.year+'-'+row.month}}</td>
                        <td class="rt-align-left">{{row.accountidName}}</td>
                        <td class="rt-number-align">{{row.expense_a}}</td>
                        <td class="rt-number-align">{{row.expense_b}}</td>
                        <td class="rt-number-align">{{row.expense_d}}</td>
                        <td class="rt-number-align">{{row.invest}}</td>
                        <td class="rt-number-align">{{row.complete_forehead}}</td>
                        <td class="rt-number-align" ng-if="row.expenseRate==null">无达成</td>
                        <td class="rt-number-align" ng-if="row.expenseRate!=null">{{row.expenseRate | toFixNumber: 2}}%</td>
                    </tr>
                </tbody>
            </table>
        </rt-data-grid>
    </div>
</div>