<style>
    .form-group .control-label {
        font-weight: 500;
        color: #555;
    }
    
    #rt-report-header th {
        text-align: left;
        vertical-align: inherit;
        border: 1px solid #f0f0f0;
        color: #555;
        font-weight: 500;
    }
    
    #rt-report-header tr,
    td {
        text-align: left;
        vertical-align: inherit;
        border: 1px solid #f0f0f0;
        color: #555;
        font-weight: 500;
    }
</style>
<form class="form-horizontal">
    <div class="form-group">
        <rt-input ng-model="vm.campaignName" rt-type="text" rt-placeholder="请输入活动名称" rt-title="活动名称" rt-required="false" rt-col="3" rt-label-col="2"></rt-input>
        <div class="col-sm-5">
        </div>
        <div class="col-sm-1">
            <button class="btn btn-primary" ng-click="vm.showReportButton()">查询</button>
        </div>
        <div class="col-sm-1">
            <button class="btn btn-primary" ng-show="vm.privilege.IsExport" ng-click='vm.actions.export({
                        "campaignName":"活动名称",
                        "startTime":"活动开始时间",
                        "createdOnTime":"签到时间",
                        "name":"姓名",
                        "telephone":"电话",
                        "gendercodeName":"性别",
                        "compay_name":"公司",
                        "jobtitle":"职位",
                        "birthdateTime":"生日"
                        },"CampaignSigninReportExport","市场活动微信签到明细")'>导出
                </button>
        </div>
    </div>
    <div class="form-group">
        <rt-datetime ng-model="vm.sYm" rt-type="date" rt-title="开始时间" rt-required="true" rt-col="3" rt-label-col="2">
        </rt-datetime>
        <rt-datetime ng-model="vm.eYm" rt-type="date" rt-title="结束时间" rt-required="true" rt-col="3" rt-label-col="2">
        </rt-datetime>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">事业部</label>
        <div class="col-sm-3">
            <ui-select allow-clear ng-model="vm.buidSelected" theme="bootstrap">
                <ui-select-match>{{ $select.selected.name }}</ui-select-match>
                <ui-select-choices repeat="item in vm.buidList|filter:$select.search">
                    <span ng-bind-html="item.name | highlight: $select.search"></span>
                </ui-select-choices>
            </ui-select>
        </div>
        <label class="col-sm-2 control-label">业务线/大区</label>
        <div class="col-sm-3">
            <ui-select allow-clear ng-model="vm.bigDepSelected" theme="bootstrap">
                <ui-select-match>{{ $select.selected.name }}</ui-select-match>
                <ui-select-choices repeat="item in vm.bigDepList |filter:$select.search">
                    <span ng-bind-html="item.name | highlight: $select.search"></span>
                </ui-select-choices>
            </ui-select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">省区/地区</label>
        <div class="col-sm-8">
            <ui-select class="form" multiple allow-clear sortable="true" theme="bootstrap" close-on-select="false" ng-model="vm.businessUnitSelected">
                <ui-select-match>{{$item.name}}</ui-select-match>
                <ui-select-choices repeat="item in vm.businessUnitList | filter: {name: $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-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 id="rt-report-header">
                        <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>
                            {{row.campaignName}}
                        </td>
                        <td>
                            {{row.starttime| date:'yyyy-MM-dd HH:mm'}}
                        </td>
                        <td>
                            {{row.CreatedOn| date:'yyyy-MM-dd HH:mm'}}
                        </td>
                        <td>
                            {{row.name}}
                        </td>
                        <td>
                            {{row.telephone}}
                        </td>
                        <td>
                            {{row.gendercodeName}}
                        </td>
                        <td>
                            {{row.compay_name}}
                        </td>
                        <td>
                            {{row.jobtitle}}
                        </td>
                        <td>
                            {{row.birthdate| date:'yyyy-MM-dd'}}
                        </td>
                    </tr>
                </tbody>
            </table>
        </rt-data-grid>
    </div>
</div>