index.vue 29.4 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 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870
<template>
  <div>
    <div class="title">
      <van-row type="flex" justify="space-around">
        <van-col span="8" class="header-text">业务员:{{ currentData.name }}</van-col>
        <van-col span="8" class="header-text">车牌号:{{ currentData.plate }}</van-col>
        <van-col span="8" class="header-text">批次:{{ currentData.batch }}</van-col>
      </van-row>
      <van-row type="flex" style="margin-top: 15px" justify="space-around">
        <van-col span="8" class="header-text">
          出发地: <span>{{ currentData.departure }}</span>
        </van-col>
        <van-col span="8" class="header-text"> 目的地:{{ currentData.arrival }} </van-col>
        <van-col span="8" class="header-text" style="display: flex">
          出发时间:<van-field v-model="currentData.departureDate" size="small" placeholder="请输入时间"
        /></van-col>
      </van-row>
    </div>
    <Table-vant :option="option" :tableData="currentData.customerData"></Table-vant>
    <div class="fixed-bottom-right">
      <div style="display: flex; justify-content: space-between; margin-top: 10px">
        <van-button round plain type="info" @click="nextOrder()">下一个</van-button>
        <van-button round plain type="primary" @click="instantPlanning">即时规划</van-button>
        <van-button round plain type="warning" @click="nextCargo()">下一批</van-button>
      </div>
      <div style="display: flex; justify-content: space-between; margin-top: 10px">
        <van-button round plain type="info" @click="lastOrder()">上一个</van-button>
        <van-button round plain type="warning" @click="lastCargo()">上一批</van-button>
      </div>
    </div>
  </div>
</template>

<script>
import TableVant from '@/components/Table.vue'
import { Toast } from 'vant'
import _ from 'lodash'
export default {
  components: { TableVant },
  data() {
    return {
      index: 0,
      date: '',
      cloneData: {},
      currentData: {
        name: '',
        plate: '',
        batch: '第一批',
        departure: '',
        arrival: '',
        departureDate: '',
        customerData: []
      },
      option: {
        column: [
          {
            label: '序号',
            tableDataprop: 'rowNo',
            width: '50px'
          },
          {
            label: '途经',
            tableDataprop: 'hospital',
            width: '230px'
          },
          {
            label: '取样数',
            tableDataprop: 'pkgs',
            width: '50px',
            align: 'right'
          },
          {
            label: '状态',
            tableDataprop: 'status',
            width: '50px'
          }
        ]
      },
      orginData: [
        {
          name: '王东',
          plate: '鲁A73HU8',
          departure: '济南迪安中心办事处',
          arrival: '济南样本室对接点',
          departureDate: '07:30',
          customerData: [
            {
              rowNo: '1',
              batch: '1',
              hospital: '济南迪安中心办事处',
              address: '济南市高新区颖秀路2755号',
              dateTime: '6:30',
              stopTime: 15,
              pkgs: '-',
              coordinate: '117.13394400,36.67904500'
            },
            // {
            //   rowNo: '2',
            //   batch: '1',
            //   hospital: '济南样本室对接点',
            //   address: '济南市高新区颖秀路2755号',
            //   dateTime: '6:50',
            //   stopTime: 10,
            //   pkgs: "-",
            //   coordinate: '117.13394400,36.67904500'
            // },
            {
              rowNo: '3',
              batch: '1',
              hospital: '济南西站对接点',
              address: '济南市槐荫区齐鲁大道6号',
              dateTime: '7:50',
              stopTime: 20,
              pkgs: '-',
              coordinate: '116.89177900,36.66887900'
            },
            {
              rowNo: '4',
              batch: '1',
              hospital: '济南和合医学检验有限公司',
              address: '槐荫区美里湖555号路海那城总部42号楼',
              dateTime: '8:55',
              stopTime: 15,
              pkgs: 100,
              coordinate: '116.91937000,36.72000800'
            },
            {
              rowNo: '5',
              batch: '1',
              hospital: '山东第一医科大学附属皮肤病医院',
              address: '济南市经十路27397号',
              dateTime: '9:30',
              stopTime: 10,
              pkgs: 100,
              coordinate: '116.92826100,36.65210900'
            },
            {
              rowNo: '6',
              batch: '1',
              hospital: '山东禾力升医学检验实验室有限公司',
              address: '济南市市中区南辛庄西路丰润 怡邻居西门',
              dateTime: '10:00',
              stopTime: 10,
              pkgs: 100,
              coordinate: '116.96255900,36.63623600'
            },
            {
              rowNo: '7',
              batch: '1',
              hospital: '市中慢病第四人民医院青龙山分院',
              address: '山东省济南市市中区南辛庄西路272号',
              dateTime: '10:20',
              stopTime: 40,
              pkgs: 100,
              coordinate: '116.95988200,36.62819100'
            },
            {
              rowNo: '8',
              batch: '1',
              hospital: '山东省医学科学院放射医学研究所',
              address: '济南经十路89号9956',
              dateTime: '11:15',
              stopTime: 15,
              pkgs: 100,
              coordinate: '117.01788200,36.64911300'
            },
            {
              rowNo: '9',
              batch: '1',
              hospital: '山东省分析测试中心',
              address: '山东省济南市历下区科院路19号详情',
              dateTime: '11:40',
              stopTime: 10,
              pkgs: 100,
              coordinate: '117.04783900,36.64556100'
            },
            // {
            //   rowNo: '10',
            //   batch: '1',
            //   hospital: '济南汇安健康管理有限公司历下门诊部',
            //   address: '济南市历下区文化西路15号',
            //   dateTime: '12:05',
            //   stopTime: 120,
            //   pkgs: 100,
            //   coordinate: '117.03081400,36.65417800'
            // },
            // {
            //   rowNo: '11',
            //   batch: '1',
            //   hospital: '武警山东总队医院',
            //   address: '山东省济南市历下区浆水泉路12--8号',
            //   dateTime: '14:45',
            //   stopTime: 15,
            //   pkgs: 100,
            //   coordinate: '117.08718600,36.65631700'
            // },
            {
              rowNo: '10',
              batch: '1',
              hospital: '济南样本室对接点',
              address: '济南市历下区颖秀路2755号',
              dateTime: '15:20',
              stopTime: 30,
              pkgs: 100,
              coordinate: '117.13394400,36.67904500'
            }
          ]
        },
        {
          name: '路飞',
          plate: '德州1333887',
          departure: '德州办事处',
          arrival: '德州办事处',
          departureDate: '08:30',
          customerData: [
            {
              rowNo: '1',
              batch: '1',
              hospital: '德州办事处',
              address: '德州市德城区世纪嘉园小区',
              dateTime: '8:40',
              stopTime: 20,
              pkgs: '-',
              coordinate: '116.33733900,37.42873700'
            },
            {
              rowNo: '2',
              batch: '1',
              hospital: '德州交通医院',
              address: '德城区东风中路389号',
              dateTime: '9:15',
              stopTime: 20,
              pkgs: 2,
              coordinate: '116.31887300,37.44295900'
            },
            {
              rowNo: '3',
              batch: '1',
              hospital: '德州市人民医院',
              address: '德州市新湖大街1751号',
              dateTime: '9:47',
              stopTime: 100,
              pkgs: 41,
              coordinate: '116.30555600,37.45116400'
            },
            {
              rowNo: '4',
              batch: '1',
              hospital: '德州市人民医院(特检)',
              address: '德州市新湖大街1751号',
              dateTime: '11:32',
              stopTime: 15,
              pkgs: 1,
              coordinate: '116.30555600,37.45116400'
            },
            {
              rowNo: '5',
              batch: '1',
              hospital: '德州市立医院对接点',
              address: '德州市德城区三八中路1766号',
              dateTime: '11:55',
              stopTime: 20,
              pkgs: '-',
              coordinate: '116.29370300,37.45320200'
            },
            // {
            //   rowNo: '6',
            //   batch: '1',
            //   hospital: '德州市立医院',
            //   address: '山东省德州市德城区三八路1766号',
            //   dateTime: '12:55',
            //   stopTime: 90,
            //   pkgs: 2,
            //   coordinate: '116.29370300,37.45320200'
            // },
            // {
            //   rowNo: '7',
            //   batch: '1',
            //   hospital: '德棉医院',
            //   address: '德州市运河开发区纺织大街522号',
            //   dateTime: '14:37',
            //   stopTime: 20,
            //   pkgs: "-",
            //   coordinate: '116.27572300,37.45761700'
            // },
            {
              rowNo: '8',
              batch: '1',
              hospital: '德州汽车站对接点',
              address: '德州市德城区东风路1667号',
              dateTime: '15:12',
              stopTime: 15,
              pkgs: '-',
              coordinate: '116.29082500,37.44405800'
            },
            {
              rowNo: '9',
              batch: '1',
              hospital: '德州办事处',
              address: '德州市德城区世纪嘉园小区',
              dateTime: '15:52',
              stopTime: 20,
              pkgs: '-',
              coordinate: '116.33733900,37.42873700'
            }
          ]
        },
        {
          name: '田耀中',
          plate: '鲁A790Z9',
          departure: '聊城联络处',
          arrival: '聊城联络处对接点',
          departureDate: '09:30',
          customerData: [
            {
              rowNo: '1',
              batch: '1',
              hospital: '聊城联络处',
              address: '山东省聊城市东昌府区',
              dateTime: '8:00',
              stopTime: 10,
              pkgs: '-',
              coordinate: '115.98849100,36.43464500'
            },
            {
              rowNo: '2',
              batch: '1',
              hospital: '聊城市东昌府区侯营镇卫生院',
              address: '山东省聊城市东昌府区侯营镇侯营村',
              dateTime: '8:35',
              stopTime: 10,
              pkgs: 100,
              coordinate: '115.88725200,36.39946400'
            },
            {
              rowNo: '3',
              batch: '1',
              hospital: '聊城市东昌府区和光诊所',
              address: '山东省聊城市东昌府区柳园街道陈口路金柱大学城A区30幢s30-113号商铺',
              dateTime: '9:12',
              stopTime: 10,
              pkgs: 100,
              coordinate: '116.01666300,36.44393800'
            },
            {
              rowNo: '4',
              batch: '1',
              hospital: '聊城市东昌府区韩集镇卫生院',
              address: '山东省聊城市东昌府区韩集镇政府',
              dateTime: '9:55',
              stopTime: 10,
              pkgs: 100,
              coordinate: '116.18228000,36.40897800'
            },
            {
              rowNo: '5',
              batch: '1',
              hospital: '茌平万里行中医诊所',
              address: '聊城市茌平县建设路1416号',
              dateTime: '10:40',
              stopTime: 10,
              pkgs: 100,
              coordinate: '116.21077700,36.56289800'
            },
            {
              rowNo: '6',
              batch: '1',
              hospital: '聊城市茌平区人民医院',
              address: '聊城市茌平县文化路99号',
              dateTime: '11:00',
              stopTime: 15,
              pkgs: 100,
              coordinate: '116.24962100,36.57960700'
            },
            {
              rowNo: '7',
              batch: '1',
              hospital: '聊城市茌平区中医医院',
              address: '聊城市茌平区新政西路1163号',
              dateTime: '11:22',
              stopTime: 30,
              pkgs: 100,
              coordinate: '116.24271400,36.58568300'
            },
            {
              rowNo: '8',
              batch: '1',
              hospital: '茌平县和睦家妇科诊所',
              address: '茌平县三产院内',
              dateTime: '12:22',
              stopTime: 5,
              pkgs: 100,
              coordinate: '116.23697900,36.58427100'
            },
            {
              rowNo: '9',
              batch: '1',
              hospital: '聊城市茌平区温陈街道社区卫生服务中心',
              address: '聊城市茌平区温陈街道',
              dateTime: '12:47',
              stopTime: 5,
              pkgs: 100,
              coordinate: '116.24984700,36.59027400'
            },
            {
              rowNo: '10',
              batch: '1',
              hospital: '聊城市茌平区胡屯镇卫生院',
              address: '聊城市茌平区新政西路1163号',
              dateTime: '13:12',
              stopTime: 10,
              pkgs: 100,
              coordinate: '116.24271400,36.58568300'
            },
            {
              rowNo: '11',
              batch: '1',
              hospital: '高唐县中医院',
              address: '高唐县东兴路16号',
              dateTime: '13:52',
              stopTime: 10,
              pkgs: 100,
              coordinate: '116.25357800,36.85772200'
            },
            {
              rowNo: '12',
              batch: '1',
              hospital: '高唐县人民医院',
              address: '山东省高唐县金城西路99号',
              dateTime: '14:17',
              stopTime: 15,
              pkgs: 100,
              coordinate: '116.22798600,36.86687600'
            },
            {
              rowNo: '13',
              batch: '1',
              hospital: '聊城市茌平区第二人民医院',
              address: '茌平县博平镇政府街',
              dateTime: '15:04',
              stopTime: 15,
              pkgs: 100,
              coordinate: '116.11760000,36.58789400'
            },
            // {
            //   rowNo: '14',
            //   batch: '1',
            //   hospital: '聊城市茌平区洪官屯镇卫生院',
            //   address: '聊城市茌平区洪官屯镇政府驻地',
            //   dateTime: '15:47',
            //   stopTime: 15,
            //   pkgs: 100,
            //   coordinate: '116.06041900,36.39670700'
            // },
            {
              rowNo: '15',
              batch: '1',
              hospital: '聊城汽车总站对接点',
              address: '聊城市东昌府区建设路与柳园北路交汇处西北角',
              dateTime: '16:22',
              stopTime: 8,
              pkgs: '-',
              coordinate: '115.98847500,36.47286500'
            },
            // {
            //   rowNo: '16',
            //   batch: '1',
            //   hospital: '聊城市东昌府区妇幼保健院(两癌)',
            //   address: '山东省聊城市东昌府区振兴西路129号',
            //   dateTime: '16:40',
            //   stopTime: 50,
            //   pkgs: 100,
            //   coordinate: '115.95710000,36.46834600'
            // },
            {
              rowNo: '17',
              batch: '1',
              hospital: '聊城联络处',
              address: '山东省聊城市东昌府区',
              dateTime: '17:43',
              stopTime: 30,
              pkgs: '-',
              coordinate: '115.98849100,36.43464500'
            },
            {
              rowNo: '18',
              batch: '1',
              hospital: '聊城联络处对接点',
              address: '山东省聊城市东昌府区',
              dateTime: '18:18',
              stopTime: 20,
              pkgs: '-',
              coordinate: '115.98849100,36.43464500'
            }
          ]
        },
        {
          name: '尹逊武',
          plate: '济南2595139',
          departure: '尹逊武家',
          arrival: '尹逊武家',
          departureDate: '06:30',
          customerData: [
            {
              rowNo: '1',
              batch: '1',
              hospital: '尹逊武家',
              address: '山东省济南市历城区北园大街57号',
              dateTime: '7:30',
              stopTime: 30,
              pkgs: 0,
              coordinate: '117.05366200,36.69689900'
            },
            {
              rowNo: '2',
              batch: '1',
              hospital: '山东大学齐鲁医院',
              address: '济南市文化西路107号',
              dateTime: '8:50',
              stopTime: 190,
              pkgs: 100,
              coordinate: '117.01839000,36.65659000'
            },
            // {
            //   rowNo: '3',
            //   batch: '1',
            //   hospital: '山东省中医院(西院)',
            //   address: '山东省济南市文化西路42号',
            //   dateTime: '11:25',
            //   stopTime: 30,
            //   pkgs: 100,
            //   coordinate: '117.02325300,36.65510600'
            // },
            {
              rowNo: '4',
              batch: '1',
              hospital: '济南市中医医院1',
              address: '山东省济南市槐荫区美里路555号海那城总部24号楼101单元401',
              dateTime: '12:05',
              stopTime: 30,
              pkgs: 100,
              coordinate: '116.91984000,36.72078200'
            },
            {
              rowNo: '5',
              batch: '1',
              hospital: '济南丽合医疗美容医院有限公司',
              address: '山东省济南市历下区黑虎泉北路61号',
              dateTime: '13:15',
              stopTime: 10,
              pkgs: 100,
              coordinate: '117.03587900,36.67266400'
            },
            // {
            //   rowNo: '6',
            //   batch: '1',
            //   hospital: '山东省千佛山医院',
            //   address: '经十路山师东路',
            //   dateTime: '13:40',
            //   stopTime: 20,
            //   pkgs: 100,
            //   coordinate: '117.04485100,36.64754900'
            // },
            {
              rowNo: '7',
              batch: '1',
              hospital: '山东第一医科大学第一附属医院',
              address: '山东省济南市历下区经十路16766号',
              dateTime: '14:05',
              stopTime: 20,
              pkgs: 100,
              coordinate: '117.04244800,36.64765800'
            },
            {
              rowNo: '8',
              batch: '1',
              hospital: '山东大学齐鲁医院',
              address: '济南市文化西路107号',
              dateTime: '14:40',
              stopTime: 140,
              pkgs: 100,
              coordinate: '117.01839000,36.65659000'
            },
            {
              rowNo: '9',
              batch: '1',
              hospital: '济南长途汽车总站对接点',
              address: '济南市天桥区济洛路131号',
              dateTime: '17:25',
              stopTime: 15,
              pkgs: 0,
              coordinate: '116.99360600,36.68543900'
            },
            {
              rowNo: '10',
              batch: '1',
              hospital: '尹逊武家',
              address: '山东省济南市历城区北园大街57号',
              dateTime: '18:10',
              stopTime: 5,
              pkgs: 0,
              coordinate: '117.05366200,36.69689900'
            }
          ]
        },
        {
          name: '孙天麟',
          plate: '鲁A2Q3C2',
          departure: '济南迪安中心办事处',
          arrival: '济南样本室对接点',
          departureDate: '09:30',
          customerData: [
            {
              rowNo: '1',
              batch: '1',
              hospital: '济南迪安中心办事处',
              address: '济南市高新区颖秀路2755号',
              dateTime: '14:00',
              stopTime: 30,
              pkgs: '-',
              coordinate: '117.13394400,36.67904500'
            },
            {
              rowNo: '2',
              batch: '1',
              hospital: '济南佰年颐堂中医医院有限公司',
              address: '山东省济南市历城区工业北路180号院内办公楼2号楼1层',
              dateTime: '14:55',
              stopTime: 10,
              pkgs: 100,
              coordinate: '117.26118400,36.63685400'
            },
            // {
            //   rowNo: '3',
            //   batch: '1',
            //   hospital: '山东元辰生物医药科技集团有限公司',
            //   address: '华山街道丑父路135号华山片区安置区二区S3号楼商业区四层',
            //   dateTime: '15:20',
            //   stopTime: 10,
            //   pkgs: 100,
            //   coordinate: '117.06162300,36.68773700'
            // },
            // {
            //   rowNo: '4',
            //   batch: '1',
            //   hospital: '山东大学第二医院(检验科)',
            //   address: '山东大学第二医院(检验科)',
            //   dateTime: '15:50',
            //   stopTime: 30,
            //   pkgs: 100,
            //   coordinate: '117.04054100,36.69042100'
            // },
            {
              rowNo: '5',
              batch: '1',
              hospital: '山东省立第三医院',
              address: '山东省济南市无影山中路12号',
              dateTime: '16:40',
              stopTime: 60,
              pkgs: 100,
              coordinate: '116.98967800,36.68406100'
            },
            {
              rowNo: '6',
              batch: '1',
              hospital: '济南长途汽车总站对接点',
              address: '济南市天桥区济洛路131号',
              dateTime: '17:45',
              stopTime: 60,
              pkgs: '-',
              coordinate: '116.99360600,36.68543900'
            },
            // {
            //   rowNo: '7',
            //   batch: '1',
            //   hospital: '济南样本室对接点',
            //   address: '济南市历下区颖秀路2755号',
            //   dateTime: '19:45',
            //   stopTime: 10,
            //   pkgs: '-',
            //   coordinate: '117.13394400,36.67904500'
            // },
            {
              rowNo: '8',
              batch: '2',
              hospital: '艾迪康',
              address: '济南市天桥区田家庄东路4号',
              dateTime: '20:45',
              stopTime: 5,
              pkgs: 100,
              coordinate: '116.97534100,36.69010900'
            },
            {
              rowNo: '9',
              batch: '2',
              hospital: '济南西站对接点',
              address: '济南市槐荫区齐鲁大道6号',
              dateTime: '21:10',
              stopTime: 15,
              pkgs: '-',
              coordinate: '116.89177900,36.66887900'
            },
            // {
            //   rowNo: '10',
            //   batch: '2',
            //   hospital: '济南长途汽车总站对接点',
            //   address: '济南市天桥区济洛路131号',
            //   dateTime: '21:45',
            //   stopTime: 15,
            //   pkgs: '-',
            //   coordinate: '116.99360600,36.68543900'
            // },
            {
              rowNo: '11',
              batch: '2',
              hospital: '济南样本室对接点',
              address: '济南市历下区颖秀路2755号',
              dateTime: '22:40',
              stopTime: 10,
              pkgs: '-',
              coordinate: '117.13394400,36.67904500'
            }
          ]
        }
      ]
    }
  },
  methods: {
    getDate() {
      this.date = new Date()
    },
    // 即时规划
    instantPlanning() {
      console.log(this.cloneData)
      this.cloneData.batch = this.currentData.batch
      this.cloneData.departureDate = this.currentData.departureDate
      let obj = _.cloneDeep(this.orginData[this.index])
      if (this.index == 4) {
        if (this.currentData.batch == '第一批') {
          obj.customerData = this.cloneData.customerData.filter(item => item.batch == 1)
          obj.arrival = this.cloneData.customerData.findLast(element => element.batch == '1').hospital
          obj.batch = '第一批'
          this.$store.dispatch('setOrder', JSON.stringify(obj))
        } else {
          obj.customerData = this.cloneData.customerData.filter(item => item.batch == 2)
          obj.customerData.unshift(this.cloneData.customerData.findLast(element => element.batch == '1'))
          obj.departure = this.cloneData.customerData[this.cloneData.customerData.length - 1].hospital
          obj.batch = '第二批'
          this.$store.dispatch('setOrder', JSON.stringify(obj))
        }
      } else {
        this.$store.dispatch('setOrder', JSON.stringify(this.cloneData))
      }
      this.$router.push({ path: '/about' })
    },
    // 下一个
    nextOrder() {
      console.log(this.orginData)
      if (this.index == this.orginData.length - 1) {
        Toast.fail('已经是最后一条')
        return
      }
      this.index++
      this.cloneData = _.cloneDeep(this.orginData[this.index])
      this.currentData = _.cloneDeep(this.orginData[this.index])
      if (this.index == 4) {
        this.currentData.customerData = this.currentData.customerData.filter(item => item.batch == 1)
      }
      this.currentData.customerData.shift()
      this.currentData.batch = '第一批'
      this.currentData.arrival = this.cloneData.customerData.findLast(element => element.batch == '1').hospital
      // this.currentData.departureDate = this.cloneData.customerData.findLast(element => element.batch == '1').dateTime
      this.currentData.customerData.forEach((item, index) => (item.rowNo = index + 1))
      this.$forceUpdate()
    },
    // 上一个
    lastOrder() {
      console.log(this.orginData)
      if (this.index == 0) {
        Toast.fail('已经是第一条')
        return
      }
      this.index--
      this.cloneData = _.cloneDeep(this.orginData[this.index])
      this.currentData = _.cloneDeep(this.orginData[this.index])
      if (this.index == 4) {
        this.currentData.customerData = this.currentData.customerData.filter(item => item.batch == 1)
      }
      this.currentData.customerData.shift()
      this.currentData.batch = '第一批'
      this.currentData.arrival = this.cloneData.customerData.findLast(element => element.batch == '1').hospital
      // this.currentData.departureDate = this.cloneData.customerData.findLast(element => element.batch == '1').dateTime
      this.currentData.customerData.forEach((item, index) => (item.rowNo = index + 1))
      this.$forceUpdate()
    },
    // 下一批
    nextCargo() {
      console.log(this.orginData[this.index].customerData)
      if (this.index == 4) {
        this.currentData.customerData = this.cloneData.customerData.filter(item => item.batch == 2)
        this.currentData.departure = this.cloneData.customerData.findLast(element => element.batch == '1').hospital
        this.currentData.departureDate = this.cloneData.customerData.findLast(element => element.batch == '1').dateTime
        this.currentData.customerData.forEach((item, index) => (item.rowNo = index + 1))
        this.currentData.batch = '第二批'
      }
      console.log(this.currentData.customerData)
    },
    // 上一批
    lastCargo() {
      if (this.index == 4) {
        this.currentData.customerData = this.cloneData.customerData.filter(item => item.batch == 1)
        this.currentData.arrival = this.cloneData.customerData.findLast(element => element.batch == '1').hospital
        this.currentData.departureDate = this.cloneData.customerData[0].dateTime
        this.currentData.customerData.forEach((item, index) => (item.rowNo = index + 1))
        this.currentData.batch = '第一批'
      }
    }
  },
  created() {
    this.orginData.forEach(item => item.customerData.forEach(item1 => (item1.status = '未去')))
    this.cloneData = _.cloneDeep(this.orginData[this.index])
    this.currentData = _.cloneDeep(this.orginData[this.index])
    this.currentData.batch = '第一批'
    this.currentData.customerData.shift()
    console.log('cloneData', this.cloneData)

    this.currentData.customerData.forEach((item, index) => (item.rowNo = index + 1))
    console.log(this.currentData.customerData)
    this.getDate()
  }
}
</script>

<style lang="scss" scoped>
.title {
  padding: 10px;
}

.header-text {
  font-size: 24px;
  font-weight: 800;
}

.table-box {
  margin: 12px 0px;

  .th-row {
    height: 56px;
    line-height: 56px;
    background: #ebf1f7;
    padding: 0px 12px;
    font-size: 36px;
  }

  .tb-row {
    font-size: 48px;
    height: 56px;
    line-height: 56px;
    padding: 0px 12px;
  }
}

.fixed-bottom-right {
  // position: absolute;
  margin-top: 80px;
  bottom: 20px;
  right: 0px;
  width: 100%;
}
</style>