<div class="row rt-margin-bottom-before-box">
    <div class="col-sm-8">
        <div class="btn-group">
            <button class="btn btn-link" ng-click='vm.actions.export({
                        "from_accountidName":"上游企业名称",
                        "from_businessunitidName":"上游部门",
                        "to_account_alias_name":"下游企业名称",
                        "product_alias_name":"药品名称",
                        "product_alias_size":"药品规格",
                        "product_alias_uom":"计量单位",
                        "product_lotno":"药品批号",
                        "newsaleto_date":"销售日期",
                        "saleto_price":"销售价格",
                        "saleto_qty":"销售数量"
                        },"DdmRawDatab2bExport","B2B流向数据")'>
                        <i class="fa fa-download"></i>导出
            </button>
        </div>
    </div>
    <div class="col-sm-4">
    </div>
</div>

<div class="box box-primary">
    <!--<div class="box-header with-border" style="cursor: move;">
        <div class="pull-left">
            <button class="btn btn-default" ng-class="{true:'active',false:'inactive'}[vm.view.isShowSearchList]" ng-click="vm.view.isShowSearchList = !vm.view.isShowSearchList;overHeightTable();">
                <i class="fa fa-filter"></i> 更多筛选 <i class="fa fa-angle-double-down"></i>
            </button>
        </div>
    </div>-->
    <div class="box box-widget">
        <!-- /.box-header -->
        <!-- form start -->
        <form class="form-horizontal">
            <div class="box-body">
            <div class="form-group">
                <rt-datetime ng-model="vm.yM" rt-type="month" rt-title="查询年月" rt-required="true" rt-col="3" rt-label-col="2">
                </rt-datetime>
                <rt-lookup2 rt-title="上游部门" ng-model="vm.fromBuSelected" rt-get-data-name="TblBusinessUnit.BusinessUnitId" rt-order-by="code"
                    rt-col-list="[{Code:'name',Name:'部门名称'},{Code:'code',Name:'部门编码'}]" rt-col="3" rt-label-col="2" ></rt-lookup2>
                <div class="btn-group" class="col-sm-2">
                    <button class="btn btn-primary" ng-click="vm.showReportButton()">查询</button>
                </div>
            </div>
            <div class="form-group">
                <rt-lookup2 rt-title="上游企业" ng-model="vm.fromAccSelected" rt-get-data-name="Account.GetAllBusinessDetail" rt-order-by="name"
                    rt-col-list="[{Code:'name',Name:'上游企业名称'},{Code:'accountnumber',Name:'上游企业编码'}]" rt-col="3" rt-label-col="2"></rt-lookup2>
            </div>
            </div>
        </form>
    </div>
    <div class="nav-tabs-custom">
        <div class="tab-content">
            <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="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-datetime-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.from_accountidName}}
                            </td>
                            <td class="rt-text-align">
                                {{row.from_businessunitidName}}
                            </td>
                            <td class="rt-text-align">
                                {{row.to_account_alias_name}}
                            </td>
                            <td class="rt-text-align">
                                {{row.product_alias_name}}
                            </td>
                            <td class="rt-text-align">
                                {{row.product_alias_size}}
                            </td>
                            <td class="rt-text-align">{{row.product_alias_uom}}</td>
                            <td class="rt-text-align">{{row.product_lotno}}</td>
                            <td class="rt-datetime-align">{{row.saleto_date | date:'yyyy-MM-dd' }}</td>
                            <td class="rt-number-align"><span ng-if="row.saleto_price">￥</span>{{row.saleto_price | toFixNumber: 4 }}</td>
                            <td class="rt-number-align">{{row.saleto_qty | toFixNumber: 2 }}</td>
                        </tr>
                    </tbody>
                </table>
            </rt-data-grid>
        </div>
    </div>
</div>







