<div class="row" style="font-size: 1.3em;border-bottom:1px solid #CCCCCC;margin-bottom:10px;padding-top:10px;">
    <div class="col-md-2">
        <div ng-if="loginData.state==1||state=='01'">地市质量报表</div>
        <div ng-if="loginData.state==2||state=='02'">生产情况统计日报表</div>
        <div ng-if="loginData.username=='ping1'||loginData.username=='ydw1'||state=='014'">平一日报表</div>
        <div ng-if="loginData.username=='ping2'||loginData.username=='ydw2'||state=='024'">平二日报表</div>
        <div ng-if="loginData.state==6||state=='06'">质检月报表</div>
        <div ng-if="loginData.state==7||state=='07'||loginData.state==8">仓库报表</div>
    </div>
    <div class="col-md-10" style="text-align: right;">
        <div style="width: auto" ng-if="loginData.state==0||loginData.state==2||state=='01'||state=='02'">
            <span>起始日期：</span>
            <input type="text" ng-model="nowDate"  id="wdate1" class="Wdate"  onClick="WdatePicker({el:this,dateFmt:'yyyyMMdd',autoPickDate:'true'})">
            <span>结束日期：</span>
            <input type="text" ng-model="month_last"  id="wdate2" class="Wdate"  onClick="WdatePicker({el:this,dateFmt:'yyyyMMdd',autoPickDate:'true'})">
            <input type="submit" ng-if="loginData.state==1||state=='01'" class="btn btn-primary" value="查询" ng-click="myClickLlx()">
            <input type="submit" ng-if="loginData.state==2||state=='02'" class="btn btn-primary" value="查询" ng-click="myClick()">
            <span ng-if="msgAlert" style="color:red;font-size: 17px;">{{msgAlert}}</span>
        </div>
        <div style="width: auto" ng-if="loginData.state==4||state=='014'||state=='024'">
            <span>查询日期：</span>
            <input type="text" ng-model="nowDate"  id="wdateCj" class="Wdate"  onClick="WdatePicker({el:this,dateFmt:'yyyyMMdd',autoPickDate:'true'})">
            <input type="submit" class="btn btn-primary" value="查询" ng-click="myCjClick()">
        </div>
        <div style="width: auto" ng-if="loginData.state==6||state=='06'">
            <span>预定位接收月份：</span>
            <input type="text" ng-model="nowMonth"  id="wdateZj" class="Wdate"  onClick="WdatePicker({el:this,dateFmt:'yyyyMM',autoPickDate:'true'})">
            <input type="submit" class="btn btn-primary" value="查询" ng-click="myZjClick()">
        </div>
        <div class="yx-div-header" ng-if="loginData.state==7||state=='07'||loginData.state==8">
            <span>查询日期：</span>
            <input type="text" id="wdate1" class="Wdate" ng-model="month_first" onClick="WdatePicker({el:this,dateFmt:'yyyyMMdd',autoPickDate:'true'})">
            <span>-</span>
            <input type="text" id="wdate2" class="Wdate" ng-model="month_last" onClick="WdatePicker({el:this,dateFmt:'yyyyMMdd',autoPickDate:'true'})">
            <input type="submit" value="查询" class="btn btn-primary" ng-click="myClick()">
            <span ng-if="msgAlert" style="color:red;font-size: 17px;">{{msgAlert}}</span>
        </div>
    </div>
</div>
<div id="mask-loading" class="mask-loading" ng-if="loading" style="background-color: rgba(0, 0, 0, 0.17);">
    <div class="loading">
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
    </div>
</div>
<div style="padding: 10px;background-color: #fff;border: 1px solid #CCC;border-radius: 10px;">
    <div ng-if="loginData.state==1||state=='01'">
        <div ng-if="dataCheckData.length>0 && dataCheckData[0][1]!='合计'">
            <table class="table table-hover" style="margin-top:10px;">
                <thead>
                <th>地市</th>
                <th>合格数</th>
                <th>不合格数</th>
                <th>不合格率</th>
                </thead>
                <tbody>
                <tr ng-repeat="city in dataCheckData">
                    <td width="100px">{{city[1]}}</td>
                    <td width="100px">{{city[2]}}</td>
                    <td width="100px">{{city[3]}}</td>
                    <td width="100px" ng-if="city[4]==0">0</td>
                    <td width="100px" ng-if="city[4]>0">{{city[4] | number:2}} </td>
                </tr>
                </tbody>
            </table>
            <div style="text-align: right">
                <button class="btn btn-primary" ng-click="printQualityReport()" >
                    下载报表
                </button>
            </div>

        </div>
        <div ng-if="dataCheckData.length==0 || dataCheckData[0][1]=='合计'" style="font-size:1.5em;">
            当天暂无报表数据。
        </div>
    </div>
    <div ng-if="loginData.state==2||state=='02'">
        <div ng-if="printDataReport.dayInfo.length>0">
            <table class="table table-hover" style="margin-top:10px;">
                <thead>
                <th></th>
                <th>普通证</th>
                <!--<th>特证</th>-->
                <th>异地KS邮</th>
                <th>异地KS普</th>
                <th>异地邮</th>
                <th>异地普</th>
                <th>KS普</th>
                <th>KS邮</th>
                <th>邮寄证</th>
                <th>废证</th>
                <th>小计</th>
                </thead>
                <tbody>
                <tr ng-repeat="city in printDataReport.dayInfo">
                    <td width="100px">{{city.cityName}}</td>
                    <td width="100px" ng-repeat="item in city.info track by $index" ng-if="$index!=1 && $index!=6 && $index!=10 && $index!=11 && $index!=12">
                        <span ng-if="item!=0">{{item}}</span>
                        <span ng-if="item==0"></span>
                    </td>
                    <td width="100px">{{city.info[12]}}</td>
                    <td width="100px">{{city.info[11]}}</td>
                </tr>
                </tbody>
            </table>
            <div style="text-align: right">
                <button class="btn btn-primary" ng-click="printPrintDataReport()" >
                    下载报表
                </button>
            </div>

        </div>
        <div ng-if="printDataReport.dayInfo == null" style="font-size:1.5em;">
            当天暂无报表数据。
        </div>
    </div>
    <div ng-if="loginData.state==4||state=='014'||state=='024'">
        <div ng-if="pingReportByDay.normalInfo.length>0 &&pingReportByDay.normalInfo[0][11]!='合计'">
            <table class="table table-hover" style="margin-top:10px;">
                <thead>
                <th>地市\制证类型</th>
                <th>普通证</th>
                <th>邮寄证</th>
                <!--<th>特证</th>-->
                <th>异地KS邮</th>
                <th>异地KS普</th>
                <th>异地邮</th>
                <th>异地普</th>
                <th>KS普</th>
                <th>KS邮</th>
                <th>小计</th>
                </thead>
                <tbody>
                <tr ng-repeat="city in pingReportByDay.normalInfo">
                    <td width="100px">{{city[11]}}</td>
                    <td width="100px" ng-if="city[0]==0"></td>
                    <td width="100px" ng-if="city[0]!=0">{{city[0]}}</td>
                    <td width="100px" ng-if="city[9]==0"></td>
                    <td width="100px" ng-if="city[9]!=0">{{city[9]}}</td>
                    <td width="100px" ng-if="city[2]==0"></td>
                    <td width="100px" ng-if="city[2]!=0">{{city[2]}}</td>
                    <td width="100px" ng-if="city[3]==0"></td>
                    <td width="100px" ng-if="city[3]!=0">{{city[3]}}</td>
                    <td width="100px" ng-if="city[4]==0"></td>
                    <td width="100px" ng-if="city[4]!=0">{{city[4]}}</td>
                    <td width="100px" ng-if="city[5]==0"></td>
                    <td width="100px" ng-if="city[5]!=0">{{city[5]}}</td>
                    <td width="100px" ng-if="city[7]==0"></td>
                    <td width="100px" ng-if="city[7]!=0">{{city[7]}}</td>
                    <td width="100px" ng-if="city[8]==0"></td>
                    <td width="100px" ng-if="city[8]!=0">{{city[8]}}</td>
                    <td width="100px" ng-if="city[10]==0"></td>
                    <td width="100px" ng-if="city[10]!=0">{{city[10]}}</td>
                </tr>
                <tr>
                    <td colspan="11" style="text-align: left;" ng-if="pingReportByDay.failedinfo.substring(3,4)=='0'">
                        {{pingReportByDay.failedinfo.substring(0,5)}}
                    </td>
                    <td colspan="11" style="text-align: left;" ng-if="pingReportByDay.failedinfo.substring(3,4)!='0'">
                        {{pingReportByDay.failedinfo}}
                    </td>
                </tr>
                </tbody>
            </table>
            <div style="text-align: right;">
                <button class="btn btn-primary" ng-click="printPingReportByDay()" >
                    下载报表
                </button>
            </div>

        </div>
        <div ng-if="pingReportByDay.normalInfo.length==0 || pingReportByDay.normalInfo[0][11]=='合计'" style="font-size:1.5em;">
            当天暂无报表数据。
        </div>
    </div>
    <div ng-if="loginData.state==6||state=='06'">
        <div ng-if="qulityCheckData.length>0 && qulityCheckData[0][3]!='合计'">
            <table class="table table-hover" style="margin-top:10px;">
                <thead>
                <th>制证类型</th>
                <th>制证一科</th>
                <th>制证二科</th>
                <th>小计</th>
                </thead>
                <tbody>
                <tr ng-repeat="city in qulityCheckData">
                    <td width="100px">{{city[3]}}</td>
                    <td width="100px" ng-if="city[4]==0"></td>
                    <td width="100px" ng-if="city[4]!=0">{{city[4]}}</td>

                    <td width="100px" ng-if="city[5]==0"></td>
                    <td width="100px" ng-if="city[5]!=0">{{city[5]}}</td>

                    <td width="100px" ng-if="city[0]==0">0</td>
                    <td width="100px" ng-if="city[0]!=0">{{city[0]}}</td>

                </tr>
                </tbody>
            </table>
            <div style="text-align: right">
                <button class="btn btn-primary" ng-click="printQualityCheckReport()" >
                    下载报表
                </button>
            </div>

        </div>
        <div ng-if="qulityCheckData.length==0 || qulityCheckData[0][3]=='合计'" style="font-size:1.5em;">
            当天暂无报表数据。
        </div>
    </div>
    <div ng-if="loginData.state==7||state=='07'||loginData.state==8">
        <div ng-if="StoreReportData.length==0" style="font-size:1.5em;">
            当天暂无报表数据。
        </div>
        <div ng-if="StoreReportData.length>0">
            <pre style="font-size: 1.3em;">{{totalCount}}</pre>
            <div ng-repeat="city in StoreReportData">
                <pre style="font-size: 1.3em;" ng-click="showTable($index)">{{city.cityName}}</pre>
                <div ng-show="showtable==$index">
                    <table class="table table-hover" style="margin-top:10px;" border="1">
                        <thead>
                        <tr>
                            <th></th>
                            <th colspan="8" style="text-align: center;">普通类型</th>
                            <th colspan="8" style="text-align: center;">邮寄类型</th>
                        </tr>
                        <tr>
                            <th></th>
                            <th colspan="2" style="text-align: center;">普通证</th>
                            <th colspan="2" style="text-align: center;">异地KS普</th>
                            <th colspan="2" style="text-align: center;">异地普</th>
                            <th colspan="2" style="text-align: center;">KS普</th>
                            <th colspan="2" style="text-align: center;">邮寄证</th>
                            <th colspan="2" style="text-align: center;">异地KS邮</th>
                            <th colspan="2" style="text-align: center;">异地邮</th>
                            <th colspan="2" style="text-align: center;">KS邮</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>区县</td>
                            <td>出库</td>
                            <td>入库</td>
                            <td>出库</td>
                            <td>入库</td>
                            <td>出库</td>
                            <td>入库</td>
                            <td>出库</td>
                            <td>入库</td>
                            <td>出库</td>
                            <td>入库</td>
                            <td>出库</td>
                            <td>入库</td>
                            <td>出库</td>
                            <td>入库</td>
                            <td>出库</td>
                            <td>入库</td>
                        </tr>
                        <tr ng-repeat="county in city.cityList">
                            <td width="100px">{{county.countyName}}</td>
                            <td width="100px">
                                <span ng-if="county.countyInfo[0]!=0">{{county.countyInfo[0]}}</span>
                                <span ng-if="county.countyInfo[0]==0"></span>
                            </td>
                            <td width="100px">
                                <span ng-if="county.countyInfo[1]!=0">{{county.countyInfo[1]}}</span>
                                <span ng-if="county.countyInfo[1]==0"></span>
                            </td>
                            <td width="100px">
                                <span ng-if="county.countyInfo[6]!=0">{{county.countyInfo[6]}}</span>
                                <span ng-if="county.countyInfo[6]==0"></span>
                            </td>
                            <td width="100px">
                                <span ng-if="county.countyInfo[7]!=0">{{county.countyInfo[7]}}</span>
                                <span ng-if="county.countyInfo[7]==0"></span>
                            </td>
                            <td width="100px">
                                <span ng-if="county.countyInfo[10]!=0">{{county.countyInfo[10]}}</span>
                                <span ng-if="county.countyInfo[10]==0"></span>
                            </td>
                            <td width="100px">
                                <span ng-if="county.countyInfo[11]!=0">{{county.countyInfo[11]}}</span>
                                <span ng-if="county.countyInfo[11]==0"></span>
                            </td>
                            <td width="100px">
                                <span ng-if="county.countyInfo[14]!=0">{{county.countyInfo[14]}}</span>
                                <span ng-if="county.countyInfo[14]==0"></span>
                            </td>
                            <td width="100px">
                                <span ng-if="county.countyInfo[15]!=0">{{county.countyInfo[15]}}</span>
                                <span ng-if="county.countyInfo[15]==0"></span>
                            </td>
                            <td width="100px">
                                <span ng-if="county.countyInfo[18]!=0">{{county.countyInfo[18]}}</span>
                                <span ng-if="county.countyInfo[18]==0"></span>
                            </td>
                            <td width="100px">
                                <span ng-if="county.countyInfo[19]!=0">{{county.countyInfo[19]}}</span>
                                <span ng-if="county.countyInfo[19]==0"></span>
                            </td>
                            <td width="100px">
                                <span ng-if="county.countyInfo[4]!=0">{{county.countyInfo[4]}}</span>
                                <span ng-if="county.countyInfo[4]==0"></span>
                            </td>
                            <td width="100px">
                                <span ng-if="county.countyInfo[5]!=0">{{county.countyInfo[5]}}</span>
                                <span ng-if="county.countyInfo[5]==0"></span>
                            </td>
                            <td width="100px">
                                <span ng-if="county.countyInfo[8]!=0">{{county.countyInfo[8]}}</span>
                                <span ng-if="county.countyInfo[8]==0"></span>
                            </td>
                            <td width="100px">
                                <span ng-if="county.countyInfo[9]!=0">{{county.countyInfo[9]}}</span>
                                <span ng-if="county.countyInfo[9]==0"></span>
                            </td>
                            <td width="100px">
                                <span ng-if="county.countyInfo[16]!=0">{{county.countyInfo[16]}}</span>
                                <span ng-if="county.countyInfo[16]==0"></span>
                            </td>
                            <td width="100px">
                                <span ng-if="county.countyInfo[17]!=0">{{county.countyInfo[17]}}</span>
                                <span ng-if="county.countyInfo[17]==0"></span>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>