bCreditReportOrderCanceled.html 24 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
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
  <th:block th:include="include :: header('自动化报告列已交付表')"/>
  <th:block th:include="include :: select2-css" />
</head>
<body class="gray-bg">
<div class="container-div">
  <div class="row">
    <div class="col-sm-12 search-collapse">
      <form id="formId">
        <div class="select-list">
          <ul>
            <li>
              企业名称:<input type="text" name="enterpriseName"/>
            </li>
            <li>
              委托公司:<input name="orderCompanyName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择归属部门" class="form-control"  required style="display: inline-block">
              <input type="hidden" name="orgId" id="treeId"/>
            </li>
<!--            <li>-->
<!--              委托公司:<input type="text" name="orderCompanyName"/>-->
<!--            </li>-->
            <!--<li>
              下单人部门:<input type="text" name="backOrderDeptName"/>
            </li>-->
            <li>
              报告类型:<select name="reportType" th:with="type=${@dict.getType('background_report_type')}">
              <option value="">所有</option>
              <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
            </select>
            </li>
            <li>
              下单人部门:
              <input class="form-control" type="text" name="deptName" onclick="selectBackDeptTree()" id="deptName" style="display: inline-block" required>
              <input type="hidden" name="backOrderDeptId" id="backOrderDeptId"/>
            </li>
            <li>
              下单渠道:<select name="source" th:with="type=${@dict.getType('source')}">
              <option value="">所有</option>
              <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
            </select>
            </li>
<!--            <li>-->
<!--              报告进度 : 取消下单报告进度默认为 1-->
              <input type="hidden" name="reportProgress" value="1"/>
<!--              报告进度:<select name="reportProgress" th:with="type=${@dict.getType('report_progress')}">-->
<!--              <option value="">所有</option>-->
<!--              <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
<!--            </select>-->
<!--            </li>-->
            <li>
              报告进度:
              <div th:each="type : ${@dict.getType('report_progress')}"
                   th:if = "${type.dictValue == '1' || type.dictValue == '7'}"
                   style="display: inline-block;height: 30px">
                <label class="checkbox-inline">
                  <input name="reportProgress" type="checkbox" th:value="${type.dictValue}" onclick="handleChoice()" style="position: absolute; width: 16px; top: -8px"/>
                  <span th:text="${type.dictLabel}"></span>
                </label>
              </div>
              <input id="reportProgressList" name="reportProgressList" type="hidden"/>
            </li>
            <li>
              是否立即生成报告:<select name="createImmediate" th:with="type=${@dict.getType('sys_yes_no')}">
              <option value="">所有</option>
              <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
            </select>
            </li>
            <li class="select-time">
              <div style="overflow: hidden">
                <label>下单时间: </label>
                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
                <span>-</span>
                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
              </div>
            </li>
            <li class="select-time">
              <div style="overflow: hidden">
                <label>应交付时间: </label>
                <input type="text" class="time-input" id="startDeliveryTime" placeholder="开始时间"
                       name="params[beginDeliveryTime]"/>
                <span>-</span>
                <input type="text" class="time-input" id="endDeliveryTime" placeholder="结束时间"
                       name="params[endDeliveryTime]"/>
              </div>
            </li>
            <li class="select-time">
              <div style="overflow: hidden">
                <label>实际交付时间: </label>
                <input type="text" class="time-input" id="startDeliveryTime1" placeholder="开始时间"
                       name="params[submitBegin]"/>
                <span>-</span>
                <input type="text" class="time-input" id="endDeliveryTime1" placeholder="结束时间"
                       name="params[submitEnd]"/>
              </div>
            </li>
            <li>
              交付人:<input type="text" name="submitName"/>
            </li>

            <!--<li>
              信用报告id:<input type="text" name="creditReportId"/>
            </li>

            <li>
              原始报告信息下载地址:<input type="text" name="firstUrl"/>
            </li>

            <li>
              最终报告信息下载地址:<input type="text" name="finalUrl"/>
            </li>

            <li>
              pdf报告下载地址:<input type="text" name="pdfUrl"/>
            </li>

            <li>
              报告生成错误信息:<input type="text" name="errorMsg"/>
            </li>

            <li>
              创建人:<input type="text" name="createBy"/>
            </li>

            <li>
              更新时间:<input type="text" name="updateTime"/>
            </li>

            <li>
              更新时间:<input type="text" name="updateBy"/>
            </li>-->

            <li>
              <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
              <a class="btn btn-warning btn-rounded btn-sm" onclick="handleReset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
            </li>
          </ul>
        </div>
      </form>
    </div>

    <div class="btn-group-sm" id="toolbar" role="group">

      <!--<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="business:bCreditReport:add">
        <i class="fa fa-plus"></i> 添加
      </a>
      <a class="btn btn-success" onclick="batchAdd()" shiro:hasPermission="business:bCreditReport:batchAdd">
        <i class="fa fa-plus"></i> 批量添加
      </a>
      <a class="btn btn-success" onclick="batchDown()" shiro:hasPermission="business:bCreditReport:batchDown">
        <i class="fa fa-plus"></i> 下载模版
      </a>
      <a class="btn btn-warning" onclick="updateXcFinanceTag()" id="xcimport"
         shiro:hasPermission="business:bCreditReport:uploadXc">
        <i class="fa fa-plus"></i> 上传详财数据
      </a>
      <a class="btn btn-success" onclick="importDsExcelTag()" id="dsimport"
         shiro:hasPermission="business:bCreditReport:uploadDs">
        <i class="fa fa-plus"></i> 上传大数数据
      </a>-->
      <!--<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="business:bAutoReport:edit">
        <i class="fa fa-edit"></i> 修改
      </a>
      <a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="business:bAutoReport:remove">
        <i class="fa fa-remove"></i> 删除
      </a>-->
      <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="business:bCreditReport:export2">
          <i class="fa fa-download"></i> 导出
       </a>
    </div>
    <div class="col-sm-12 select-table table-striped">
      <table id="bootstrap-table" data-mobile-responsive="true"></table>
    </div>
  </div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
  var editFlag = [[${@permission.hasPermi('business:bCreditReport:edit')}]];
  var removeFlag = [[${@permission.hasPermi('business:bCreditReport:remove')}]];
  //菜单权限
  var jfFlag = [[${@permission.hasPermi('business:bCreditReport:jf')}]];
  var cxjflag = [[${@permission.hasPermi('business:bCreditReport:cxjf')}]];
  var thFlag = [[${@permission.hasPermi('business:bCreditReport:th')}]];
  //财务导入权限

  var prefix = ctx + "business/bCreditReportOrderCanceled";
  var impl = ctx + "business/bCreditReportOrderCanceled";
  $(function () {

    var options = {
      url: prefix + "/getBcreditReportList",
      createUrl: prefix + "/add",
      updateUrl: prefix + "/edit/{id}",
      removeUrl: prefix + "/remove",
      exportUrl: prefix + "/export",
      modalName: "报告列表",
      showExport: false,
      columns: [{
        checkbox: true
      },
        {
          field: 'id',
          title: '',
          visible: false
        },
        {
          field: 'enterpriseName',
          title: '企业名称',
          sortable: true
        },
        {
          field: 'orderCompanyName',
          title: '委托公司',
          sortable: false,
          visible: true
        },
        {
          field: 'applicationName',
          title: '委托人',
          sortable: false,
          visible: true
        },
        {
          field: 'backOrderDeptName',
          title: '下单人部门',
          sortable: false,
          visible: true
        },
        {
          field: 'backOrderUserName',
          title: '下单人',
          sortable: false,
          visible: true
        },

        {
          field: 'reportTypeStr',
          title: '报告类型',
          sortable: false,
          visible: true
        },
        {
          field: 'entrustTypeStr',
          title: '委托类型',
          sortable: false,
          visible: true
        },
        {
          field: 'createTime',
          title: '报告下单时间',
          sortable: false,
          visible: true
        },
        {
          field: 'createImmediate',
          title: '是否立即生成报告',
          sortable: false,
          visible: true
        },
        {
          field: 'deliveryTime',
          title: '应交付时间',
          sortable: false,
          visible: true
        },
        {
          field: 'reportProgressStr',
          title: '报告进度',
          sortable: false,
          visible: true
        },
        {
          field: 'source',
          title: '下单渠道',
          formatter:function (value) {
            if (value == '1') {
              return "人保海外订单";
            } else if (value == '2') {
              return "信用管家前台";
            } else if (value == '3') {
              return "信用管家后台";
            }else if(value=='4'){
              return "川商投订单";
            }
          }
        },
        {
          field : 'submitDate',
          title : '实际交付日期',
          sortable: false,
          visible: true
        },
        {
          field : 'submitName',
          title : '实际交付人',
          sortable: false,
          visible: true
        },

        {
          title: '操作',
          align: 'left',
          formatter: function (value, row, index) {
            var actions = [];
            actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showRemark(\'' + row.id + '\')"><i class="fa fa-plus"></i>备注</a> ')
            return actions.join('');
          }
        }
      ]
    };
    $.table.init(options);


  });


  function reJF(id) {
    layer.open({
      area: ['400px', '230px'],
      title: "是否退回审核列表",
      // 弹层外区域关闭
      btn1: function (layero, index) {
        $.get(prefix + "/reJiaofu?id=" + id, (data) => {
          $.modal.msg(data.msg)
          $.modal.closeAll();
        })
      }
    })
  }

  function showFile(element, filetitle) {
    console.log(1)
    let json = element.getAttribute("data1");
    console.log(json)
    let jsonFile = JSON.parse(json);
    var dom = "";
    if ($.common.isNotEmpty(jsonFile.firstDoc)) {
      dom = dom + ' <button type="button" class="btn btn-w-m btn-warning"  style="margin: 5px 10px;"   data1=\'' + JSON.stringify(jsonFile.firstDoc) + '\'  onclick="scoreCardDownload(this,\'生成报告doc\')" >生成报告doc</button>';
    }
    if ($.common.isNotEmpty(jsonFile.lastDoc)) {
      dom = dom + ' <button type="button" class="btn btn-w-m btn-warning"  style="margin: 5px 10px;"   data1=\'' + JSON.stringify(jsonFile.lastDoc) + '\'  onclick="scoreCardDownload(this,\'修改报告doc\')">修改报告doc</button>';
    }
    if ($.common.isNotEmpty(jsonFile.pdf)) {
      dom = dom + ' <button type="button" class="btn btn-w-m btn-warning"  style="margin: 5px 10px;"   data1=\'' + JSON.stringify(jsonFile.pdf) + '\' onclick="scoreCardDownload(this,\'最终pdf\')" >最终pdf</button>';
    }
    if ($.common.isNotEmpty(jsonFile.scoreCard)) {
      dom = dom + ' <button type="button" class="btn btn-w-m btn-warning"  style="margin: 5px 10px;"   data1=\'' + JSON.stringify(jsonFile.scoreCard) + '\'  onclick="scoreCardDownload(this,\'生成打分卡\')">生成打分卡</button>';
    }
    if ($.common.isNotEmpty(jsonFile.sfExcel)) {
      dom = dom + ' <button type="button" class="btn btn-w-m btn-warning" style="margin: 5px 10px;"    data1=\'' + JSON.stringify(jsonFile.sfExcel) + '\' onclick="scoreCardDownload(this,\'司法案件\')" >司法案件</button>';
    }
    if ($.common.isNotEmpty(jsonFile.transPdf)) {
      dom = dom + ' <button type="button" class="btn btn-w-m btn-warning" style="margin: 5px 10px;"    data1=\'' + JSON.stringify(jsonFile.transPdf) + '\' onclick="scoreCardDownload(this,\'翻译报告\')" >翻译报告</button>';
    }
    layer.open({
      area: ['400px', '280px'],
      title: "生成文件列表",
      content: dom,
      // 弹层外区域关闭
      btn1: function (layero, index) {
        $.modal.closeAll();
        /*$.get(prefix + "/reJiaofu?id=" + id, (data) => {
          $.modal.msg(data.msg)
          $.modal.closeAll();
        })*/
      }
    })
  }

  showFile()

  function scoreCardDownload(element, filetitle) {
    let json = element.getAttribute("data1");
    console.log(json)
    let jsonFile = JSON.parse(json);
    let name = jsonFile.fileName;
    let fileType = jsonFile.fileExtension;
    let fileName = name + '.' + fileType.toLowerCase();
    let cardDwonlaodUrl = jsonFile.fileAttachments;
    // console.log(cardScoreInfo);
    // console.log(cardDwonlaodUrl);
    let url = ctx + "business/bCreditReport/downloadScoreCard";
    var data = {cardScoreUrl: cardDwonlaodUrl};

    fetch(url, {
      method: 'POST',
      headers: {
        'Accept': '*/*'
      },
      body: JSON.stringify(data),
      responseType: 'blob'
    }).then(response => {
      return response.blob();
    }).then(blob => {
      const url = window.URL.createObjectURL(blob);
      let a = document.createElement('a');
      a.style.display = 'none';
      a.href = url;

      a.download = fileName;
      document.body.append(a);
      a.click();
      //删除对应的表情
      document.body.removeChild(a);
      window.URL.revokeObjectURL(url);
    })
  }

  /**
   * 重新生成报告
   * @param aotuReportId
   */
  /*function reCreateReport(aotuReportId) {
    var id = aotuReportId;
    var url = prefix + "/reCreateReport";
    console.log(url)
    var data = {
      id:id,
    }

    fetch(url,{
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      body: JSON.stringify(data),
    }).then(response => {
      if (!response.ok){
        throw new Error("respnose error")
      }
      return response.json();
    }).then(data => {
      if (data.code === 2000){
        $.modal.alert(data.msg);
      }
    }).catch(error => {
      console.log(error);
      $.modal.alertError("报告重新生成失败");
    })
  }*/


  // 添加信息
  function batchAdd() {
    $.modal.open("批量添加", prefix + "/batchAdd");
  }

  function batchDown() {
    var url = prefix + "/downExcel";
    window.open(url);
  }


  //新添加功能
  function updateXcFinanceTag() {
    //普通版   特殊版
    layer.open({
      title: '上传详财财务数据',
      area: ['500px', '500px']
      ,
      content: '<div><input type="file"  class="form-control" id="xcFile" /><select class="form-control" id="xcType" style="margin:2% 0;"><option value="3">新版</option><option value="1">老版本</option><option value="2">特殊版</option></select><div class="btn btn-success" style="width: 100%" onclick="updateXcFinancefun()">上传</div></div>'
    });
  }

  function importDsExcelTag(name) {
    layer.open({
      area: ['400px', '230px'],
      title: "导入大数财务数据",
      content: '<input type="file" id="dsField"/></br>',
      // 弹层外区域关闭
      btn1: function (layero, index) {
        console.log("执行")
        var files = $("#dsField")[0].files[0]
        var formData = new FormData();
        formData.append("file", files);
        $.ajax({
          url: impl + "/importDsFinance",
          type: 'POST',
          data: formData,
          processData: false,
          contentType: false,
          success: function (data) {
            console.log(data)
            $.modal.msg(data.msg)
            $.modal.closeAll();
          }
        });

      }
    })
  }

  function updateXcFinancefun() {
    alert("开始上传");
    var files = $("#xcFile")[0].files[0]
    var xcType = $("#xcType").val()
    if (null == files || undefined == files) {
      $.modal.msg("请先选择文件")
      return;
    }
    console.log(files.name.indexOf(".xls"))
    if (files.name.indexOf(".xlsx") <= 0 && files.name.indexOf(".xls") <= 0) {
      $.modal.msg("请上传表格.xlsx/.xls")
      return;
    }

    var formData = new FormData();
    formData.append("file", files);
    formData.append("xcType", xcType);
    var url = xcType == "1" ? "importFinanceData" : xcType == 2 ? "importData" : "newXcGroup1";
    $.ajax({
      url: impl + "/" + url,
      type: 'POST',
      data: formData,
      processData: false,
      contentType: false,
      success: function (data) {
        console.log(data)
        $.modal.msg(data.msg)
      }
    });
  }

  /**
   * 重新生成报告
   * @param aotuReportId
   */
  function reCreateReport(aotuReportId) {
    layer.open({
      title: '在线调试'
      ,
      content: '<input type="text" placeholder="修改的行业Code" id="newIndustry" style="width:100%;margin-bottom: 5px;"></br>' +
        '<input type="number" placeholder="修改评分" id="md_score" style="width:100%;;margin-bottom: 5px;"></br>' +
        '<input type="number" placeholder="修改违约率" id="md_default_rate" style="width:100%;;margin-bottom: 5px;"></br>' +
        '<input type="number" placeholder="修改授信额度" id="creditLimit" style="width:100%;;margin-bottom: 5px;"></br>' +
        '<select id="lvImgIpt"  class="form-control"> <option value="">请选择信用等级</option> <option value="AA">AA</option> <option value="A">A</option> <option value="BB">BB</option> <option value="B">B</option> <option value="B-">B-</option> <option value="C">C</option> <option value="C-">C-</option> <option value="D">D</option> <option value="NR">NR</option> </select>'
      ,
      btn: ['生成', '取消']
      ,
      yes: function (index, layero) {
        var id = aotuReportId;
        var url = prefix + "/reCreateReport";
        var newId = $("#newIndustry").val()
        var creditScore = $("#md_score").val()
        var defaultRate = $("#md_default_rate").val()
        var creditLv = $("#lvImgIpt").val()
        var creditLimit = $("#creditLimit").val()

        $.get(url + "?id=" + id + "&userName=" + newId + "&creditScore=" + creditScore + "&creditLv=" + creditLv + "&defaultRate=" + defaultRate + "&creditLimit=" + creditLimit, (data) => {
        })
        $.table.refresh();
        layer.close(index); //如果设定了yes回调,需进行手工关闭
      }
      ,
      cancel: function () {
      }

    });

  }

  /**
   * 重新生成报告
   * @param aotuReportId
   */
  function reCreateReportHw(aotuReportId) {
    $.ajax({
      url: prefix + "/reCreateReportHw",
      type: 'POST',
      data: {"id": aotuReportId},
      dataType: 'json',
      success: function (data) {
        console.log(data)
        $.modal.msg(data.msg)
        $.table.refresh();
      }
    });
  }

  //修改报告进度
  function updataStatus(id, satus) {
    $.ajax({
      url: prefix + "/updateStatus",
      type: 'POST',
      data: {"id": id, "reportProgress": satus},
      dataType: 'json',
      success: function (data) {
        console.log(data)
        $.modal.msg(data.msg)
        $.table.refresh();
      }
    });
  }

  //交付
  function jf(id) {
    var url = prefix + "/editJf/" + id;
    $.modal.open("交付报告", url);
  }

  //交付
  function hwjf(id) {
    var url = prefix + "/editHwJf/" + id;
    $.modal.open("海外报告交付", url);
  }


  //报告制作
  function zz(id) {
    timeOut();
    $.ajax({
      url: prefix + "/make",
      type: 'POST',
      data: {"id": id},
      dataType: 'json',
      success: function (data) {
        // $.modal.msg(data.msg)
        $.table.refresh();
      }
    });
  }

  function timeOut() {
    setTimeout(function () {
      $.table.refresh();
    }, 500); // 延时5000毫秒(5秒)
  }

  /*用户管理-新增-选择部门树*/
  function selectDeptTree() {
    var treeId = $("#treeId").val();
    var deptId = $.common.isEmpty(treeId) ?"23" : $("#treeId").val();
    var url = ctx + "business/frontDept/selectDeptTree/" + deptId;
    console.log(url)
    var options = {
      title: '选择部门',
      width: "380",
      url: url,
      expandLevel: 2,
      callBack: doSubmit
    };
    $.modal.openOptions(options);
  }

  function doSubmit(index, layero){
    var body = layer.getChildFrame('body', index);
    $("#treeId").val(body.find('#treeId').val());
    $("#treeName").val(body.find('#treeName').val());
    layer.close(index);
  }

  function handleChoice() {
    var list = document.querySelectorAll("input[name='reportProgress']:checked");
    let temp = []
    list.forEach(item=> {
      temp.push(item.value);
    })
    $("#reportProgressList").val(temp.join(","))
  }


  /*用户管理-修改-选择部门树*/
  function selectBackDeptTree() {
    var deptId = $.common.isEmpty($("#deptId").val()) ? "100" : $("#deptId").val();
    var url = ctx + "system/dept/selectDeptTree/" + deptId;
    var options = {
      title: '选择部门',
      width: "380",
      url: url,
      callBack: doBackSubmit
    };
    $.modal.openOptions(options);
  }

  function doBackSubmit(index, layero){
    var tree = layero.find("iframe")[0].contentWindow.$._tree;
    if ($.tree.notAllowParents(tree)) {
      var body = layer.getChildFrame('body', index);
      $("#backOrderDeptId").val(body.find('#treeId').val());
      $("#deptName").val(body.find('#treeName').val());
      layer.close(index);
    }
  }

  function handleReset() {
    $("#backOrderDeptId").val("")
    $("#treeId").val("")
    $("#reportProgressList").val("")
    $.form.reset()
  }

  //显示备注
  function showRemark(id){
    var url = prefix + "/showRemark/" + id;
    $.modal.open("显示备注", url);
  }

</script>
</body>

<!-- 导入区域 -->
<script id="importTpl" type="text/template">
  <form enctype="multipart/form-data" class="mt20 mb10">
    <div class="col-xs-offset-1">
      <input type="file" id="file" name="file"/>
      <div class="mt10 pt5">
        <input type="checkbox" id="updateSupport" name="updateSupport" title="如果登录账户已经存在,更新这条数据。">
        是否更新已经存在的用户数据
        &nbsp; <a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i>
        下载模板</a>
      </div>
      <font color="red" class="pull-left mt10">
        提示:仅允许导入“xls”或“xlsx”格式文件!
      </font>
    </div>
  </form>
</script>
</html>