<div class="app-content-body app-content-full fade-in-up" ng-class="{'h-full': app.hideFooter }">
    <div class="hbox hbox-auto-xs hbox-auto-sm bg-light "
         ng-init="app.settings.asideFixed = true;app.settings.asideDock = false;app.settings.container = false;app.hideAside = false;app.hideFooter = true;">

        <div class="hbox hbox-auto-xs hbox-auto-sm">
            <div class="col w-md bg-light dk b-r bg-auto">
                <div class="wrapper b-b bg">
                    <button class="btn btn-sm btn-default pull-right visible-sm visible-xs" ui-toggle-class="show"
                            target="#email-menu"><i class="fa fa-bars"></i></button>
                    <a class="w-xs font-bold">任务循环单</a>
                </div>
                <div class="wrapper hidden-sm hidden-xs" id="email-menu">
                    <ul class="nav nav-pills nav-stacked nav-sm">
                        <li ng-repeat="type in typeList" ui-sref-active="active"
                            ng-class="{true: 'active', false: ''}[type.isActive]">
                            <a ng-click="check_type(type.typeCode)">
                                {{type.typeName}}({{type.typeCount}})
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="col">
                <!-- header -->
                <div class="row" style="padding-top:15px;padding-left:20px;">
                    <span class="col-lg-2">
                        <div class="input-group w-md">
                            <input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt"
                                   is-open="opened" datepicker-options="dateOptions" ng-required="true"
                                   close-text="Close"/>
                            <span class="input-group-btn">
                               <button type="button" class="btn btn-default" ng-click="open($event)"><i
                                       class="glyphicon glyphicon-calendar"></i></button>
                            </span>
                        </div>
                    </span>
                    <span class="col-lg-1" style="margin-left: 6em">
                        <button type="button" class="btn btn-primary" ng-click="task_click()">查询</button>
                    </span>
                </div>
                <!-- / header -->
                <div class="wrapper-md">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            制证任务
                        </div>
                        <div class="table-responsive">
                            <table class="table table-striped b-t b-light">
                                <thead>
                                <th>循环单编号</th>
                                <th>地市</th>
                                <th>组数</th>
                                <th>组号</th>
                                <th>数据核验</th>
                                <th>不合格</th>
                                <th>机器号</th>
                                <th>状态</th>
                                <th>操作</th>
                                </thead>
                                <tbody ng-repeat="city in cityList| orderBy:citycode:desc">
                                <tr>
                                    <td>{{city.task_Id}}</td>
                                    <td><span class="city"
                                              style="color: #337ab7;display:inline-block">{{city.cityName}}</span></td>
                                    <td>{{city.groupCount}}</td>
                                    <td>{{city.groupNO}}</td>
                                    <td>{{city.groupSum}}</td>
                                    <td>{{city.groupInvailedSum}}</td>
                                    <td>
                                        <span style="padding-left:10px;"
                                              ng-show="city.printer_Id==null">未分配</span>
                                        <span style="padding-left:10px;"
                                              ng-show="city.printer_Id!=null">机器<span>{{city.printer_Id}}</span></span>
                                    </td>
                                    <td>{{city.state}}</td>
                                    <td ng-if="userState<=4"><a ng-click="showTable(city.task_Id)">组号列表</a></td>
                                    <td ng-if="userState>4"><a ng-click="showTable(city.task_Id)">区县列表</a></td>
                                    <td><a ng-click="finishClick(city.task_Id,userState)">完成</a></td>
                                </tr>
                                <tr ng-show="showtable==city.task_Id && userState<=4">
                                    <td></td>
                                    <td colspan="4">
                                        <table style="font-size:0.9em;color: #000;" class="table">
                                            <thead>
                                            <th>组号</th>
                                            <th>合格数量</th>
                                            <th>不合格数量</th>
                                            <th>特殊证件数量</th>
                                            <th>特殊证件列表</th>
                                            </thead>
                                            <tbody>
                                            <tr ng-repeat="group in groupList">
                                                <td>{{group.groupNO}}</td>
                                                <td>{{group.vaildCount}}</td>
                                                <td>{{group.invaildCount}}</td>
                                                <td>{{group.specialCardCount}}</td>
                                                <td><a ng-click="showTableGroup(group.specialCardList)">特殊证件列表</a></td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>

                                <tr ng-show="showtable==city.task_Id && userState>4">
                                    <td></td>
                                    <td colspan="4">
                                        <table style="font-size:0.9em;color: #000;" class="table">
                                            <thead>
                                            <th>区县名称</th>
                                            <th>卸载数量</th>
                                            <th>完成数量</th>
                                            <th>电写入数量</th>
                                            <th>出库数量</th>
                                            <th>入库数量</th>
                                            </thead>
                                            <tbody>
                                            <tr ng-repeat="county in countyList">
                                                <td>{{county.countyName}}</td>
                                                <td>{{county.downloadCount}}</td>
                                                <td>{{county.finish_Count}}</td>
                                                <td>{{county.electric_writerCount}}</td>
                                                <td>{{county.out_Storage_Count}}</td>
                                                <td>{{county.in_Storage_Count}}</td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>


                                </tbody>
                            </table>
                        </div>
                        <footer class="panel-footer">
                            <div class="row">
                                <div class="col-sm-4 text-right text-center-xs">
                                    <ul class="pagination pagination-sm m-t-none m-b-none">
                                        <li><a href><i class="fa fa-chevron-left"></i></a></li>
                                        <li><a href>1</a></li>
                                        <li><a href>2</a></li>
                                        <li><a href>3</a></li>
                                        <li><a href>4</a></li>
                                        <li><a href>5</a></li>
                                        <li><a href><i class="fa fa-chevron-right"></i></a></li>
                                    </ul>
                                </div>
                            </div>
                        </footer>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>