liveApply.html 46.5 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">

<head th:replace="../templates/common/head::head">
</head>

<body class="skin-blue sidebar-mini">

<div class="wrapper">
    <div th:replace="../templates/common/frame::frame"></div>
    <div class="content-wrapper" style="min-height: 788px;">
        <section class="content-header">
            <h1>
                直播申请审核
            </h1>
            <ol class="breadcrumb">
                <li>首页</li>
                <li class="active">直播申请审核</li>
            </ol>
        </section>
        <section class="content">
            <div class="row">
                <div class="col-md-12">
                    <div class="box box-info">
                        <div class="box-body">

                            <div class="btn-group margin-bottom pull-left">
                                <!--                                 <input type="hidden" name="state" id="state" value=""/> -->
                                <div class="btn-group margin-bottom" id="hide_select_area_2" style=>
                                    <button type="button" class="btn btn-success btn-sm margin-r-5 action claim"
                                            value="2" data="claim" id="claim" data-toggle="modal"
                                            data-target="#modal" onclick="receive(0);">认领
                                    </button>
                                    <button type="button" class="btn btn-success btn-sm margin-r-5 action claim"
                                            value="2" data="claim100" id="claim100" data-toggle="modal"
                                            data-target="#modal" onclick="receive(10);">认领10条
                                    </button>
                                    <button type="button" class="btn btn-success btn-sm margin-r-5 action claim"
                                            value="2" data="claim1000" id="claim1000" data-toggle="modal"
                                            data-target="#modal" onclick="receive(100);">认领100条
                                    </button>
                                    <button type="button" class="btn btn-warning btn-sm margin-r-5 action claim"
                                            value="2" data="claim1000" id="claim1000" data-toggle="modal"
                                            data-target="#modal" onclick="retReceive();">退领
                                    </button>
                                    <button type="button" class="btn btn-danger btn-sm margin-r-5 action claim"
                                            value="2" data="claim1000" id="claim1000" data-toggle="modal"
                                            data-target="#modal" onclick="repulse();">拒绝
                                    </button>
                                </div>
                            </div>


                            <div class="btn-group margin-bottom pull-right">
                                <button type="button" class="btn  btn-success btn-sm margin-r-5 filter "
                                        th:onclick="'javascript:daochu()'" value="" id="excel">
                                    导出excel
                                </button>
                                <button type="button" class="btn  btn-sm margin-r-5 filter "
                                        th:onclick="'javascript:quanbu()'" value="" id="quanbu">
                                    查询
                                </button>
                                <button type="button" class="btn btn-sm margin-r-5 filter " id="daishen"
                                        th:onclick="'javascript:daishen()'" value="0">全部待领
                                </button>
                                <button type="button" class="btn btn-sm margin-r-5 filter " id="Mydaishen"
                                        th:onclick="'javascript:Mydaishen()'" value="0">我的待审
                                </button>
                                <button type="button" class="btn  btn-sm margin-r-5 filter " id="yishen"
                                        th:onclick="'javascript:yishen()'" value="1">我的已审
                                </button>
                                <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query"
                                        onclick="openOrClose(&#39;forms&#39;)">
                                    <span id="a_up">展开▼</span><span id="a_down" style="display: none;">收起▲</span>
                                </button>
                            </div>
                            <div class="form-horizontal form-group-sm" id="forms" style="display: none;float: left;">
                                <div class="btn-group margin-bottom col-md-6"
                                     style="padding: 0;width: 15%;float: left;">
                                    <div class="col-md-6" style="padding: 0;width: 100%;">
                                        <label for="liveApply_theme" class="control-label cb-toolbar">直播主题:</label>
                                        <div class="col-sm-7" style="padding: 0;">
                                            <input class="form-control" type="text" th:value="${Theme}" value=""
                                                   id="liveApply_theme">
                                        </div>
                                    </div>
                                </div>

                                <div class="btn-group margin-bottom col-md-6"
                                     style="padding-left:0px;width: 13%;float: left;">
                                    <div class="col-md-5" style="padding: 0;width: 100%;">
                                        <label for="shenhe_state" class="control-label cb-toolbar">状态:</label>
                                        <div class="col-sm-7" style="padding: 0;">
                                            <select class="form-control" id="shenhe_state" name="shenhe_state">
                                                <option value="">全部</option>
                                                <option value="0" th:selected="${LiveApplyStatus==0}">未审核</option>
                                                <option value="1" th:selected="${LiveApplyStatus==1}">已通过</option>
                                                <option value="2" th:selected="${LiveApplyStatus==2}">已拒绝</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <!--                                 <div class="btn-group margin-bottom col-md-6" style="padding-left: 10px;width: 13%;float: left;"> -->
                                <!--                                     <div class="col-md-5" style="padding: 0;width: 100%;"> -->
                                <!--                                         <label for="business_model" class="control-label cb-toolbar">模式:</label> -->
                                <!--                                         <div class="col-sm-8" style="padding: 0;"> -->
                                <!--                                             <select class="form-control" id="business_model" name="business_model"> -->
                                <!--                                                 <option value="">全部</option> -->
                                <!--                                                 <option value="0">免费</option> -->
                                <!--                                                 <option value="1">收费</option> -->
                                <!--                                             </select> -->
                                <!--                                         </div> -->
                                <!--                                     </div> -->
                                <!--                                 </div> -->
                                <div class="btn-group margin-bottom col-md-6"
                                     style="padding-left: 0px;width: 15%;float: left;">
                                    <div class="col-md-5" style="padding: 0;width: 100%;">
                                        <label for="organization" class="control-label cb-toolbar">发起单位:</label>
                                        <div class="col-sm-7" style="padding: 0;">
                                            <input class="form-control" type="text" th:value="${Organization}" value=""
                                                   id="organization"
                                                   name="organization">
                                        </div>
                                    </div>
                                </div>
                                <div class="btn-group margin-bottom col-md-6"
                                     style="padding-left: 0px;width: 15%;float: left;">
                                    <div class="col-md-6" style="padding: 0;width: 100%;"
                                         th:if="${session.sessionUser.spid==0}">
                                        <label for="sp_desc" class="control-label cb-toolbar">sp简称:</label>
                                        <div class="col-sm-7" style="padding: 0;">
                                            <input class="form-control" type="text" th:value="${Sp_desc}" value=""
                                                   id="sp_desc">
                                        </div>
                                    </div>
                                </div>
                                <div class="btn-group margin-bottom col-md-6"
                                     style="padding-left: 0px;width: 20%;float: left;">
                                    <div class="col-md-12" style="padding: 0;width: 100%;">
                                        <label for="start_date" class="control-label cb-toolbar">预计时间:</label>
                                        <div class="input-group col-md-8 date">
                                            <input class="form-control date" name="start_date" type="text"
                                                   id="start_date" th:value="${Start_date}">
                                            <span class="input-group-addon">
                                                <span class="glyphicon glyphicon-calendar"></span>
                                                </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="btn-group margin-bottom col-md-6"
                                     style="padding-left: 0px;width: 18%;float: left;">
                                    <div class="col-md-9" style="padding: 0;width: 100%;">
                                        <label for="start_date" class="control-label cb-toolbar"></label>
                                        <div class="input-group col-md-8 date">
                                            <input class="form-control date" name="end_date" type="text"
                                                   id="end_date" th:value="${End_date}">
                                            <span class="input-group-addon">
                                                <span class="glyphicon glyphicon-calendar"></span>
                                                </span>
                                        </div>
                                    </div>
                                </div>


                                <!--                                 <div class="btn-group margin-bottom col-md-6 pull-right" -->
                                <!--                                      style="position: relative;width: 40%;float: left !important;"> -->
                                <!--                                     <div class="col-md-12" style="width: 100%;padding: 0;"> -->
                                <!--                                         <div class="col-md-11" style="padding: 0;width: 25%;"> -->
                                <!--                                             <label for="start_date" class="control-label cb-toolbar">时间:</label> -->
                                <!--                                             <div class="input-group col-md-9 date"> -->
                                <!--                                                 <input class="form-control date" name="start_date" type="text" -->
                                <!--                                                        id="start_date"> -->
                                <!--                                                 <span class="input-group-addon"> -->
                                <!--                                                 <span class="glyphicon glyphicon-calendar"></span> -->
                                <!--                                                 </span> -->
                                <!--                                             </div> -->
                                <!--                                         </div> -->
                                <!--                                         <div class="col-md-11" style="padding: 0;width: 25%;"> -->
                                <!--                                             <label for="start_date" class="control-label cb-toolbar">至</label> -->
                                <!--                                             <div class="input-group col-md-9 date"> -->
                                <!--                                                 <input class="form-control date" name="end_date" type="text" -->
                                <!--                                                        id="end_date"> -->
                                <!--                                                 <span class="input-group-addon"> -->
                                <!--                                                 <span class="glyphicon glyphicon-calendar"></span> -->
                                <!--                                                 </span> -->
                                <!--                                             </div> -->
                                <!--                                         </div> -->


                                <!--                                     </div> -->
                                <!--                                 </div> -->
                            </div>

                            <div class="fixed-table-container" style="padding-bottom: 0px;">
                                <div class="fixed-table-body">
                                    <table id="table" data-toggle="table" class="table table-hover table-striped"
                                           style="margin-bottom: 0; ">
                                        <thead>
                                        <tr>
                                            <th class="bs-checkbox " style="width: 5%; " data-field="state"
                                                tabindex="0">
                                                <div class="th-inner "><input name="btSelectAll" type="checkbox"
                                                                              id="select_all">
                                                </div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; width: 6%; " data-field="sp_id_brief"
                                                tabindex="0">
                                                <div class="th-inner ">sp简称</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; width: 18%; " data-field="video_title"
                                                tabindex="0">
                                                <div class="th-inner ">直播主题</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; width: 6%; " data-field="sp_id_brief"
                                                tabindex="0">
                                                <div class="th-inner ">发起单位</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <!--                                             <th style="text-align: center; width: 3%; " data-field="is_hot_name" -->
                                            <!--                                                 tabindex="0"> -->
                                            <!--                                                 <div class="th-inner ">商务模式</div> -->
                                            <!--                                                 <div class="fht-cell"></div> -->
                                            <!--                                             </th> -->
                                            <th style="text-align: center; width: 3%; " data-field="is_hot_name"
                                                tabindex="0">
                                                <div class="th-inner ">直播类型</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; width: 3%; " data-field="updater"
                                                tabindex="0">
                                                <div class="th-inner ">审核员</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; width: 3%; " data-field="state_name"
                                                tabindex="0">
                                                <div class="th-inner ">审核状态</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; width: 3%; " data-field="state_name"
                                                tabindex="0">
                                                <div class="th-inner ">审核类型</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; width: 3%; " data-field="state_name"
                                                tabindex="0">
                                                <div class="th-inner ">邮件通知</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; width: 10%; " data-field="upload_time"
                                                tabindex="0">
                                                <div class="th-inner ">直播申请时间</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; width: 10%; " data-field="created_at"
                                                tabindex="0">
                                                <div class="th-inner ">预计开播时间</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; width: 20%; " data-field="action"
                                                tabindex="0">
                                                <div class="th-inner ">操作</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr data-index="0" th:each="liveApply : ${liveApplyPage.list}">
                                            <td class="bs-checkbox ">
                                                <input data-index="0" name="btSelectItem" type="checkbox"
                                                       th:value="${liveApply.id}">
                                            </td>
                                            <td style="text-align: center; width: 6%;"
                                                th:text="${liveApply.spid_desc}"></td>
                                            <td style="text-align: center; width: 20%;">
                                                <a class="detail"
                                                   th:href="@{'/liveApply/details/?id='+${liveApply.id}}">
                                                    <span th:text="${liveApply.theme}">邓建国正面PK冯小刚</span>
                                                </a>
                                            </td>
                                            <td style="text-align: center; width: 6%;"
                                                th:text="${liveApply.organization}"></td>
                                            <!--                                             <td style="text-align: center; width: 3%;" -->
                                            <!--                                                 th:text="${liveApply.business_model=='1'?'收费':'免费'}">收费 -->
                                            <!--                                             </td> -->
                                            <td style="text-align: center; width: 3%;" th:text="${liveApply.live_type}">
                                                直播分类
                                            </td>
                                            <td style="text-align: center; width: 6%;" th:text="${liveApply.updater}">
                                                审核员
                                            </td>
                                            <td style="text-align: center; width: 3%;">
                                                <span class="btn btn-sm btn-warning"
                                                      th:if="${liveApply.shenhe_state==0}">待审</span>
                                                <span class="btn btn-sm btn-success"
                                                      th:if="${liveApply.shenhe_state==1}">通过</span>
                                                <span class="btn btn-sm btn-danger"
                                                      th:if="${liveApply.shenhe_state==2}">拒绝</span>
                                            </td>
                                            <td style="text-align: center; width: 3%;">
                                                <span th:if="${liveApply.shenhe_type==1}">免审</span>
                                                <span th:if="${liveApply.shenhe_type==2}">机审</span>
                                                <span th:if="${liveApply.shenhe_type==3}">人工审</span>
                                            </td>
                                            <td style="text-align: center; width: 5%;">
                                                <span class="btn btn-sm btn-warning"
                                                      th:if="${liveApply.email_notice_state==1}">未通知</span>
                                                <span class="btn btn-sm btn-success"
                                                      th:if="${liveApply.email_notice_state==2}">已通知</span>
                                                <span class="btn btn-sm btn-danger"
                                                      th:if="${liveApply.email_notice_state==3}">通知失败</span>
                                            </td>
                                            <td style="text-align: center; width: 10%;"
                                                th:text="${#dates.format(liveApply.created_at, 'yyyy-MM-dd HH:mm:ss')}">
                                                2018-03-07 16:56:20
                                            </td>
                                            <td style="text-align: center; width: 10%;"
                                                th:text="${#dates.format(liveApply.pre_start_time, 'yyyy-MM-dd HH:mm:ss')}">
                                                2018-03-07 16:56:20
                                            </td>
                                            <td style="text-align: center; width: 17%;">
                                                <a class="detail"
                                                   th:href="@{'/liveApply/details/?id='+${liveApply.id}}">
                                                    <button class="btn btn-info btn-sm">查看</button>
                                                </a>
                                                <span th:if="${liveApply.shenhe_state==0 and liveApply.receive==0}"> &nbsp;</span>
                                                <a th:href="@{'javascript:applyReceive('+${liveApply.id}+')'}"
                                                   th:if="${liveApply.shenhe_state==0 and liveApply.receive==0}">
                                                    <button class="btn btn-primary btn-sm">认领</button>
                                                </a>
                                                <span th:if="${liveApply.shenhe_state==0 and liveApply.receive==1 and session.sessionUser.userId==liveApply.auditor}"> &nbsp;</span>
                                                <a th:href="@{'javascript:applyRetReceive('+${liveApply.id}+')'}"
                                                   th:if="${liveApply.shenhe_state==0 and liveApply.receive==1 and session.sessionUser.userId==liveApply.auditor}">
                                                    <button class="btn btn-warning btn-sm">退领</button>
                                                </a>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>


                                <!--分页处理-->
                                <div class="fixed-table-pagination" style="display: block;">
                                    <div class="pull-left pagination-detail">
                                        <span class="pagination-info" th:text="'共 '+${liveApplyPage.total}+' 条记录,每页显示'">共 0 条记录</span>
                                        <select class="" id="pageSize" name="pageSize" onchange="selectPageSize()">
                                            <option value="10" th:selected="${pageSize==10}">10</option>
                                            <option value="20" th:selected="${pageSize==20}">20</option>
                                            <option value="50" th:selected="${pageSize==50}">50</option>
                                            <option value="100" th:selected="${pageSize==100}">100</option>
                                        </select>
                                        <span class="pagination-info">条记录</span>
                                    </div>
                                    <div class="pull-right pagination">
                                        <ul class="pagination" th:if="${liveApplyPage.pages>1}">
                                            <li class="page-pre"><a th:href="'javascript:fanye(1);'">‹‹</a></li>
                                            <li class="page-pre" th:if="${!liveApplyPage.isFirstPage}"><a
                                                    th:onclick="'javascript:fanye(\''+${liveApplyPage.pageNum-1}+'\');'"></a>
                                            </li>

                                            <li class="page-number" th:if="${liveApplyPage.pageNum-3>=1}"><a
                                                    th:onclick="'javascript:fanye(\''+${liveApplyPage.pageNum-3}+'\');'"
                                                    th:text="${liveApplyPage.pageNum-3}">2</a></li>
                                            <li class="page-number" th:if="${liveApplyPage.pageNum-2>=1}"><a
                                                    th:onclick="'javascript:fanye(\''+${liveApplyPage.pageNum-2}+'\');'"
                                                    th:text="${liveApplyPage.pageNum-2}">2</a></li>
                                            <li class="page-number" th:if="${liveApplyPage.pageNum-1>=1}"><a
                                                    th:onclick="'javascript:fanye(\''+${liveApplyPage.pageNum-1}+'\');'"
                                                    th:text="${liveApplyPage.pageNum-1}">2</a></li>
                                            <li class="page-number active"><a href="javaScript:void(0);"
                                                                              th:text="${liveApplyPage.pageNum}">2</a>
                                            </li>
                                            <li class="page-number"
                                                th:if="${liveApplyPage.pageNum+1<=liveApplyPage.pages}"><a
                                                    th:onclick="'javascript:fanye(\''+${liveApplyPage.pageNum+1}+'\');'"
                                                    th:text="${liveApplyPage.pageNum+1}">2</a></li>
                                            <li class="page-number"
                                                th:if="${liveApplyPage.pageNum+2<=liveApplyPage.pages}"><a
                                                    th:onclick="'javascript:fanye(\''+${liveApplyPage.pageNum+2}+'\');'"
                                                    th:text="${liveApplyPage.pageNum+2}">2</a></li>
                                            <li class="page-number"
                                                th:if="${liveApplyPage.pageNum+3<=liveApplyPage.pages}"><a
                                                    th:onclick="'javascript:fanye(\''+${liveApplyPage.pageNum+3}+'\');'"
                                                    th:text="${liveApplyPage.pageNum+3}">2</a></li>

                                            <li class="page-next" th:if="${!liveApplyPage.isLastPage}"><a
                                                    th:onclick="'javascript:fanye(\''+${liveApplyPage.pageNum+1}+'\');'"></a>
                                            </li>
                                            <li class="page-next"><a
                                                    th:onclick="'javascript:fanye(\''+${liveApplyPage.pages}+'\');'">››</a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
    <script th:inline="javascript">
        //      获取路径参数
        function GetQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]);
            return null;
        }

        //  状态==2是展开状态 触发展开
        $(function () {
            if (GetQueryString("expand_list_state") == "2") {
                $("#query").click();
            }
            //按钮颜色设置
            var state = [[${param.shenhe_state}]] ? [[${param.shenhe_state}]][0] : null;
            var receive = [[${param.receive}]] ? [[${param.receive}]][0] : null;
            var stateIsNull = $.trim(state) == "";
            var receiveIsNull = $.trim(receive) == "";
            if (receiveIsNull) {
                $("#quanbu").addClass("btn-info");
            } else if (state == '0' && receive == '0') {
                $("#daishen").addClass("btn-warning");
            } else if (state == '0' && receive == '1') {
                $("#Mydaishen").addClass("btn-success");
            } else if (!stateIsNull && state != '0' && receive == '1') {
                $("#yishen").addClass("btn-danger");
            }

        })

        //翻页函数
        function fanye(page) {
            var param = location.search;
            if (param.indexOf("page=") != -1) {
                var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
                var split = se.split("&");
                var h = "";
                for (var i = 0; i < split.length; i++) {
                    var s = split[i];
                    if (s.indexOf("page=") < 0) h = h + "&" + split[i];
                }
                h = h.substring(1, h.length);
                window.location.href = "/liveApply/page?" + h + "&page=" + page;
            } else {
                param = param.substring(1, param.length);
                window.location.href = "/liveApply/page?" + param + "&page=" + page;
            }
        }

        //选择每页数量触发函数
        function selectPageSize() {
            var pageSize = $("#pageSize").val();
            var param = location.search;
            if (param.indexOf("pageSize=") != -1) {
                var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
                var split = se.split("&");
                var h = "";
                for (var i = 0; i < split.length; i++) {
                    var s = split[i];
                    if (s.indexOf("pageSize=") < 0 && s.indexOf("page=") < 0) h = h + "&" + split[i];
                }
                h = h.substring(1, h.length);
                window.location.href = "/liveApply/page?" + h + "&page=" + 1 + "&pageSize=" + pageSize;
            } else {
                var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
                var split = se.split("&");
                var h = "";
                for (var i = 0; i < split.length; i++) {
                    var s = split[i];
                    if (s.indexOf("page=") < 0) h = h + "&" + split[i];
                }
                h = h.substring(1, h.length);
                window.location.href = "/liveApply/page?" + h + "&page=" + 1 + "&pageSize=" + pageSize;
            }
        }

        //导出excel
        function daochu() {
            var param = location.search;
            window.location.href = "/liveApply/excel" + param;
        }

        var liveApply_theme = "";
        var start_date = "";
        var end_date = "";
        var sp_desc = "";
        var organization = "";
        var shenhe_state = "";
        var count = "";
        var expand_list_state = "";

        function updateValue() {
            expand_list_state = $("#forms").attr("expand_list_state");
            liveApply_theme = $("#liveApply_theme").val();
            start_date = $("#start_date").val();
            end_date = $("#end_date").val();
            shenhe_state = $("#shenhe_state").val();
            organization = $("#organization").val();
            count = $("#pageSize").val();
            var spId = [[${session.sessionUser.spid}]];
            if (spId == 0) {
                sp_desc = $("#sp_desc").val();
            }
        }


        //全部
        function quanbu() {
            updateValue();
            var receive = "";
            window.location.href = "/liveApply/page?theme=" + liveApply_theme + "&start_date=" + start_date + "&end_date=" + end_date + "&shenhe_state=" + shenhe_state + "&receive=" + receive + "&organization=" + organization + "&sp_desc=" + sp_desc + "&page=" + 1 + "&pageSize=" + count + "&expand_list_state=" + expand_list_state;
        }

        //全部待领
        $('#daishen').click(function () {
            updateValue();
            if ($.trim(shenhe_state) == '') shenhe_state = 0;
            var receive = 0;
            window.location.href = "/liveApply/page?theme=" + liveApply_theme + "&start_date=" + start_date + "&end_date=" + end_date + "&shenhe_state=" + shenhe_state + "&receive=" + receive + "&organization=" + organization + "&sp_desc=" + sp_desc + "&page=" + 1 + "&pageSize=" + count + "&expand_list_state=" + expand_list_state;
        });
        //我的待审核
        $('#Mydaishen').click(function () {
            updateValue();
            var receive = 1;
            if ($.trim(shenhe_state) == '') shenhe_state = 0;
            window.location.href = "/liveApply/page?theme=" + liveApply_theme + "&start_date=" + start_date + "&end_date=" + end_date + "&shenhe_state=" + shenhe_state + "&receive=" + receive + "&organization=" + organization + "&sp_desc=" + sp_desc + "&page=" + 1 + "&pageSize=" + count + "&expand_list_state=" + expand_list_state;
        });
        //我的已审核
        $('#yishen').click(function () {
            updateValue();
            var receive = 1;
            if ($.trim(shenhe_state) == '') shenhe_state = 3;//审核状态,3代表通过和拒绝都查询
            window.location.href = "/liveApply/page?theme=" + liveApply_theme + "&start_date=" + start_date + "&end_date=" + end_date + "&shenhe_state=" + shenhe_state + "&receive=" + receive + "&organization=" + organization + "&sp_desc=" + sp_desc + "&page=" + 1 + "&pageSize=" + count + "&expand_list_state=" + expand_list_state;
        });


        //查询
        $('#videos_query').click(function () {
            window.location.href = "/liveApply/page?theme=" + liveApply_theme + "&start_date=" + start_date + "&end_date=" + end_date + "&shenhe_state=" + shenhe_state + "&organization=" + organization + "&sp_desc=" + sp_desc + "&page=" + 1 + "&pageSize=" + count + "&expand_list_state=" + expand_list_state;
        });
        /*全选的操作*/
        $('#select_all').click(function () {
            if ($("[name=btSelectItem]:checkbox:not(:checked)").length > 0) {
                $("#select_all").prop('checked', true);
                $("[name=btSelectItem]:checkbox").each(function () {
                    $(this).prop('checked', true);
                });
            } else {
                $("#select_all").prop('checked', false);
                $("[name=btSelectItem]:checkbox").each(function () {
                    $(this).prop('checked', false);
                });
            }
        });

        /**
         * 认领
         */
        function receive(n) {
            if (n > 0) {
                applyReceiveNum(n);
            } else {
                var rows = $("[name=btSelectItem]:checkbox:checked");
                if (rows.length > 0) {
                    var ids = "";
                    rows.each(function (i, e) {
                        ids = ids + "," + e.value;
                    })
                    ids = ids.substring(1);
                    applyReceive(ids);
                } else {
                    alert("请选择要认领的内容!");
                }
            }
        }

        //认领选中请求
        function applyReceive(ids) {
            $.post("/liveApply/receive?ids=" + ids, function (data) {
                if (data.errorCode == 0) {
                    alert(data.errorMessage);
                    location.href = location.href;
                } else {
                    alert(data.errorMessage);
                }
            })
        }

        //认领多条请求
        function applyReceiveNum(num) {
            $.post("/liveApply/receive?num=" + num, function (data) {
                if (data.errorCode == 0) {
                    alert(data.errorMessage);
                    location.href = location.href;
                } else {
                    alert(data.errorMessage);
                }
            })
        }

        //退领选中内容
        function retReceive() {
            var rows = $("[name=btSelectItem]:checkbox:checked");
            if (rows.length > 0) {
                var r = confirm("您确定退领选中的" + rows.length + "条内容吗?");
                if (r == true) {
                    var ids = "";
                    rows.each(function (i, e) {
                        ids = ids + "," + e.value;
                    })
                    ids = ids.substring(1);
                    applyRetReceive(ids);
                }
            } else {
                alert("没有选中的数据!");
            }
        }

        //退领
        function applyRetReceive(ids) {
            $.post("/liveApply/retReceive?ids=" + ids, function (data) {
                if (data.errorCode == 0) {
                    alert(data.errorMessage);
                    location.href = location.href;
                } else {
                    alert(data.errorMessage);
                }
            })
        }

        //拒绝(打回)弹窗
        function repulse() {
            var rows = $("[name=btSelectItem]:checkbox:checked");
            if (rows.length > 0) {
                var r = confirm("您确定拒绝选中的" + rows.length + "条内容吗?");
                if (r == true) {
                    $('#msgModal').modal('show');
                }
            } else {
                alert("没有选中的数据!");
            }
        }

        //批量打回
        function repulseSubmit() {
            var rows = $("[name=btSelectItem]:checkbox:checked");
            var ids = "";
            rows.each(function (i, e) {
                ids = ids + "," + e.value;
            })
            ids = ids.substring(1);
            var msg = $("#reviewMsg").val();
            if (msg == '') {
                alert('请输入审核意见!');
                return false;
            }
            $.post("/liveApply/shenheLiveApply?ids=" + ids + "&msg=" + msg + "&state=" + 2, function (data) {
                if (data.errorCode == 0) {
                    alert(data.errorMessage);
                    location.href = location.href;
                } else {
                    alert(data.errorMessage);
                }
            })
        }

        //批量通过
        function morePass() {
            var rows = $("[name=btSelectItem]:checkbox:checked");
            if (rows.length > 0) {
                var r = confirm("您确定通过选中的" + rows.length + "条内容吗?");
                if (r == true) {
                    var ids = "";
                    rows.each(function (i, e) {
                        ids = ids + "," + e.value;
                    })
                    ids = ids.substring(1);
                    var msg = "直播申请审核通过";
                    $.post("/liveApply/shenheLiveApply?ids=" + ids + "&msg=" + msg + "&state=" + 1, function (data) {
                        if (data.errorCode == 0) {
                            alert(data.errorMessage);
                            location.href = location.href;
                        } else {
                            alert(data.errorMessage);
                        }
                    })
                }
            } else {
                alert("没有选中的数据!");
            }
        }
    </script>
    <!-- 模态框(Modal) -->
    <div class="modal fade" id="msgModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content" style="margin-top: 30%;">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title" id="myModalLabel">审核意见</h4>
                </div>
                <div class="modal-body">
                    <div class="form-group" style="margin-bottom: 0;">
                        <textarea id="reviewMsg" style="width: 100%;height: 80px;"></textarea>
                    </div>
                    <div class="form-group">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" onclick="javascript:repulseSubmit();">提交</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div>
    <!-- /.modal -->

    <!--保留之前的样式代码-->
    <script>
        $('#a_down').hide();

        /*查询样式*/
        function openOrClose(id_name_str) {
            var id_name = '#' + id_name_str;
            if ($(id_name).css('display') == 'block') {
                $(id_name).slideUp(350);
                $('#a_up').show();
                $('#a_down').hide();
                $("#forms").attr("expand_list_state", "1");
            } else {
                $(id_name).slideDown(350);
                $('#a_up').hide();
                $('#a_down').show();
                $("#forms").attr("expand_list_state", "2");
            }
        }

        /*时间插件*/
        $('.date').datetimepicker({
//             format: 'YYYY-MM-DD HH:mm:ss',
            format: 'YYYY-MM-DD',
            locale: "zh-CN",
            toolbarPlacement: 'bottom',
            showClear: true,
        });
    </script>
    <footer th:replace="../templates/common/foot::foot"></footer>
    <!-- Add the sidebar's background. This div must be placed
         immediately after the control sidebar -->
    <div class="control-sidebar-bg" style="position: fixed; height: auto;"></div>
</div><!-- ./wrapper -->

<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script type="text/javascript">
    $('div.alert').not('.alert-danger').delay(3000).slideUp(300);
</script>

<!-- AdminLTE App -->
<script src="./../../static/js/app.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="./../../static/js/sidebar.js"></script>
</body>
</html>