<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="1"></rt-datetime>
        <rt-datetime ng-model="vm.eYm"
                     rt-type="month"
                     rt-title="结束年月" rt-required="true" rt-col="3" rt-label-col="1"></rt-datetime>
        <div class="col-sm-1">
            <button class="btn btn-primary" ng-click="vm.search()">查询</button>
        </div>
    </div>
    <div class="form-group">
        <rt-lookup2 rt-title="销售区域"
                    ng-model="vm.unitSelected"
                    rt-get-data-name="TblBusinessUnit.BusinessUnitId"
                    rt-order-by="name"
                    rt-col-list="[{Code:'name',Name:'销售区域'},{Code:'code',Name:'区域编码'}]"
                    rt-label-col="1"
                    rt-required="false"
                    rt-col="3"></rt-lookup2>
        <label class="col-sm-1 control-label"><span style="color:red;">*</span>Top</label>
        <div class="col-sm-3">
            <ui-select allow-clear ng-model="vm.topsSelected" theme="bootstrap">
                <ui-select-match>{{$select.selected}}</ui-select-match>
                <ui-select-choices repeat="item in vm.topsList | filter: $select.search">
                    <span ng-bind-html="item| highlight: $select.search"></span>
                </ui-select-choices>
            </ui-select>
        </div>
    </div>
</form>
<form class="form-horizontal">
    <div id="report1" style="height:800px;"ng-style="{ width: chartWidth + 'px' }"/>
</form>
<div class="row" style="border-top: 1px dotted #d5c4c4; padding-top: 20px">
    <rt-data-grid rt-page-record-count="vm.recordCount"
                  rt-page-index="vm.pageIndex" rt-page-size="vm.pageSize"
                  rt-get-data="vm.search()"
                  rt-rows="vm.data"
                  rt-auto-height="240">
        <table class="table table-hover">
            <thead>
            <tr>
                <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.data">
                <td>{{row.BusinessUnitIdName}}</td>
                <td>{{row.OwnerIdName}}</td>
                <td>{{row.yearPercent}}%</td>
                <td>{{row.year}}</td>
                <td>{{row.month}}</td>
                <td>{{row.returnmoneytarget}}</td>
                <td>{{row.achieveprice}}</td>
                <td>{{row.monthPercent}}%</td>
            </tr>
            </tbody>
        </table>
    </rt-data-grid>
</div>

