<form class="form-horizontal">
    <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>
        </rt-datetime>
        <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({},"BusinessDeliveryreportExport","按事业部发货统计分析")'>导出
            </button>
        </div>
</div>
</form>
<div class="row" style="border-top: 1px dotted #d5c4c4; padding-top: 20px">

<div class="col-sm-30">
    <rt-data-grid-no-page 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 id="headCode">
    <tr>
        <th rowspan="3" style="text-align:center;border-right:1px solid #f0f0f0;">品名规格</th>
        <th colspan="2" style="text-align:center;border-right:1px solid #f0f0f0;">各事业部累计发货数量和发货额</th>
        <th colspan="2" style="text-align:center;border-right:1px solid #f0f0f0;" ng-repeat="item in vm.buDataList">{{item.BuIdName}}</th>
    </tr>
    <!--<tr id="rt-report-header">-->
    <tr>
        <th class="rt-number-align">累计发货数量</th>
        <th class="rt-number-align">累计发货额（元）</th>
        <th class="rt-number-align" ng-repeat="Mtext in vm.TbMessText track by $index">{{Mtext}}</th>
    </tr>
</thead>
<tbody>
    <tr ng-repeat="row in vm.reportData">
        <td>{{row.ProductIdName}}</td>
        <td class="rt-number-align">{{row.Done_Qty}}</td>
        <td class="rt-number-align">{{row.Done_Amount}}</td>
        <td ng-repeat="Items in vm.getCountMoney($index) track by $index" class="rt-number-align">{{Items}}
    </tr>
    <tr>
        <td>总计</td>
        <td class="rt-number-align">{{vm.sumqty}}</td>
        <td class="rt-number-align">{{vm.sumamount | toFixNumber:2 }}</td>
        <td ng-repeat="Items in vm.reportDataSum.bulistsum track by $index" class="rt-number-align">{{Items}}
    </tr>
</tbody>
</table>
</rt-data-grid-no-page>
</div>
</div>