<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">
                <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 class="form-group">
                <rt-lookup2 rt-title="品种" ng-model="vm.salesRegionProductCategory" rt-get-data-name="Product.GetProductSize" rt-order-by="code" rt-col-list="[{Code:'name',Name:'品种名称'},{Code:'size',Name:'品种规格'}]" rt-required="false" rt-col="8" rt-multiple="true"></rt-lookup2>
            </div>
            <div class="form-group">
                <rt-lookup2 rt-title="门店" ng-model="vm.accountSeleted" rt-get-data-name="Account.GetAllRetail" rt-order-by="name asc" rt-col-list="[{Code:'name',Name:'门店名称'},{Code:'accountnumber',Name:'门店编号'}]" rt-required="false" rt-col="8" rt-label-col="2"></rt-lookup2>
            </div>
            <div class="form-group">
                <rt-input ng-model="vm.patientIdName" rt-type="text" rt-title="患者" rt-required="false" rt-col="8" rt-label-col="2"></rt-input>
            </div>
    </form>

    <div class="form-group">
        <rt-datetime ng-model="vm.sDate" rt-type="date" rt-required="true" rt-title="日期-从" rt-col="3" rt-label-col="2">
        </rt-datetime>
        <rt-datetime ng-model="vm.eDate" rt-type="date" rt-required="true" rt-title="日期-到" rt-col="3" rt-label-col="2">
        </rt-datetime>
    </div>

    <div class="box-footer">
        <div class="btn-group pull-right">
            <button class="btn btn-primary" ng-click="vm.search()">查询</button>
            <!-- <button class="btn btn-primary" ng-click='vm.actions.export({},"DTPOutgoingQueryExportPlugin","DTP出库查询")'>
                导出
             </button> -->
            <button class="btn btn-default" ng-click='vm.actions.export({
                                "BusinessUnitIdName":"区域",
                                "accountIdName":"门店",
                                "CreatedOn":"出库时间|datetime|yyyy/MM/dd HH:mm:ss",
                                "name":"患者",
                                "store_out_typeName":"类型",
                                "productIdName":"品种",
                                "productSize":"规格",
                                "code":"条码",
                                "qty":"数量"
                            },"DTPOutgoingQueryExportPlugin","DTP出库查询")'>导出</button>
        </div>
    </div>
    <div class="box box-primary">
        <div class="nav-tabs-custom">
            <div class="tab-content">
                <rt-data-grid rt-page-record-count="vm.recordCount" rt-page-index="vm.page.index" rt-page-size="vm.page.size" rt-get-data="vm.updata()" rt-sort-field="vm.view.sortField" rt-rows="vm.data" rt-selected-ids="vm.view.selectedIds" rt-auto-height="{{vm.view.autoHeight}}">
                    <table class="table table-hover">
                        <thead>
                            <tr>
                                <th rowspan="2" class="rt-text-align" rt-field-code="BusinessUnitIdName" ng-click="vm.getListWay('BusinessUnitIdName')">区域</th>
                                <th rowspan="2" class="rt-text-align" rt-field-code="accountIdName" ng-click="vm.getListWay('accountIdName')">门店</th>
                                <th rowspan="2" class="rt-text-align" rt-field-code="CreatedOn" ng-click="vm.getListWay('CreatedOn')">出库时间</th>
                                <th rowspan="2" class="rt-text-align">患者</th>
                                <th rowspan="2" class="rt-text-align">类型</th>
                                <th rowspan="2" class="rt-text-align" rt-field-code="productIdName" ng-click="vm.getListWay('productIdName')">品种</th>
                                <th rowspan="2" class="rt-text-align">规格</th>
                                <th rowspan="2" class="rt-number-align">条码</th>
                                <th rowspan="2" class="rt-number-align">数量</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ng-repeat="row in vm.data">
                                <td class="rt-text-align">
                                    {{row.BusinessUnitIdName}}
                                </td>
                                <td class="rt-text-align">
                                    <!-- {{row.accountIdName}} -->
                                    1惠民药店
                                </td>
                                <td class="rt-text-align">
                                    {{row.CreatedOn|date:'yyyy-MM-dd HH:mm'}}
                                </td>
                                <td class="rt-text-align">
                                    {{row.name}}
                                </td>
                                <td class="rt-text-align">
                                    {{row.store_out_typeName}}
                                </td>
                                <td class="rt-text-align">
                                    {{row.productIdName}}
                                </td>
                                <td class="rt-text-align">
                                    {{row.productSize}}
                                </td>
                                <td class="rt-number-align">
                                    {{row.code}}
                                </td>
                                <td class="rt-number-align">
                                    {{row.qty}}
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </rt-data-grid>
            </div>
        </div>
    </div>