<form class="form-horizontal">
    <div class="form-group">
        <label class="col-sm-1 control-label">药品名称</label>
        <div class="col-sm-3">
            <ui-select allow-clear ng-model="vm.productSelected" theme="bootstrap">
                <ui-select-match>{{ $select.selected.Name }}</ui-select-match>
                <ui-select-choices repeat="item in vm.productList|filter:$select.search">
                    <span ng-bind-html="item.Name | highlight: $select.search"></span>
                </ui-select-choices>
            </ui-select>
        </div>
        <rt-lookup2 rt-title="终端名称"
                    ng-model="vm.toEntInfoName"
                    rt-get-data-name="Account.GetAllTerminal"
                    rt-order-by="accountnumber"
                    rt-col-list="[{Code:'name',Name:'客户名称'},{Code:'accountnumber',Name:'客户编码'}]"
                    rt-required="true"
                    rt-label-col="1"
                    rt-col="3"></rt-lookup2>
        <!--<rt-input ng-model="vm.toEntInfoName" rt-title="终端名称" rt-required="true" rt-col="3" rt-label-col="1"></rt-input>-->
        <div class="col-sm-1">
            <button class="btn btn-primary" ng-click="vm.showReportButton()">查询</button>
        </div>
    </div>
    <div class="form-group">
        <rt-datetime ng-model="vm.startYM"
                     rt-type="month"
                     rt-title="开始时间" rt-required="true" rt-col="3" rt-label-col="1">
        </rt-datetime>
        <rt-datetime ng-model="vm.endYM"
                     rt-type="month"
                     rt-title="结束时间" rt-required="true" rt-col="3" rt-label-col="1">
        </rt-datetime>
    </div>
</form>

<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">
                <thead>
                <tr>
                    <th>#</th>
                    <th>发货企业所在省</th>
                    <th>所在市</th>
                    <th>企业名称</th>
                    <th>商业级别</th>
                    <th>交易时间</th>
                    <th>药品名称</th>
                    <th>药品规格</th>
                    <th>产品批号</th>
                    <th>销量</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="row in vm.reportData">
                    <td>
                        {{$index+1}}
                    </td>
                    <td>
                        {{row.fromprovinceidName}}
                    </td>
                    <td>
                        {{row.fromcityidName}}
                    </td>
                    <td>
                        {{row.fromaccountidName}}
                    </td>
                    <td>
                        {{row.acc_levelName}}
                    </td>
                    <td>
                        {{row.billdate}}
                    </td>
                    <td>
                        {{row.drugidName}}
                    </td>
                    <td>
                        {{row.productsize}}
                    </td>
                    <td>
                        {{row.lotno}}
                    </td>
                    <td>
                        {{row.saleto_count}}
                    </td>
                </tr>
                </tbody>
            </table>
        </rt-data-grid>
    </div>
</div>