<form class="form-horizontal">
    <div class="form-group">
        <label class="col-sm-1 control-label"><span style="color:red;">*</span>药品名称</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>

        <label class="col-sm-1 control-label"><span style="color:red;">*</span>省份</label>
        <div class="col-sm-3">
            <ui-select allow-clear ng-model="vm.provinceSelected" theme="bootstrap">
                <ui-select-match>{{ $select.selected.NAME }}</ui-select-match>
                <ui-select-choices repeat="item in vm.provinceList |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.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>

    <div class="form-group">
        <label class="col-sm-1 control-label"><span style="color:red;">*</span>窜入/窜出</label>
        <div class="col-sm-3">
            <ui-select allow-clear ng-model="vm.cWaySelected" theme="bootstrap">
                <ui-select-match>{{ $select.selected.Name }}</ui-select-match>
                <ui-select-choices repeat="item in vm.cWayList|filter:$select.search">
                    <span ng-bind-html="item.Name | highlight: $select.search"></span>
                </ui-select-choices>
            </ui-select>
        </div>
    </div>
</form>
<div class="row" style="border-top: 1px dotted #d5c4c4; padding-top: 20px">
    <div class="col-sm-12">
        <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>
                <th>产品批号</th>
                <th>出库数量</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="row in vm.reportData">
                <td>{{ $index+1 }}</td>
                <td>{{ row.billDate }}</td>
                <td>{{ row.fromEntInfoName }}</td>
                <td>{{ row.fromProvCode }}</td>
                <td>{{ row.fromCityCode }}</td>
                <td>{{ row.fromCircLinkLevel }}</td>
                <td>{{ row.toEntInfoName }}</td>
                <td>{{ row.toProvCode }}</td>
                <td>{{ row.toCityCode }}</td>
                <td>{{ row.toEntTypeId }}</td>
                <td>{{ row.productBatchNo }}</td>
                <td>{{ row.outCount }}</td>
            </tr>
            </tbody>
        </table>
        </rt-data-grid>
    </div>
</div>



