index.vue 31.8 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 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936
<template>
  <div style="background-color:#f7f7f7;padding:10px 10px;">
    <div class="zhuti" v-if="ggXin == false && detbox==false && genjinShow==false && tanpanShow ==false">
      <div style="height:58px;line-height:58px;">
        <div style="color:#0006"> <span>商户意向管理</span> <span style="padding:0 5px;">></span> <span
            style="color:#000000e6">寻租申请管理</span></div>
      </div>
      <div>
        <!-- 搜索 -->
        <div class="formSearch">
          <el-form :inline="true" :model="formSel">
            <el-form-item label="意向客户名称">
              <el-input v-model="formSel.intentCustomerName" placeholder="请输入" class="moren" style="width:168px" />
            </el-form-item>
            <el-form-item label="意向资源类型">
              <el-select v-model="formSel.leaseType" placeholder="请选择" style="width:168px">
                <el-option label="商铺" value="商铺" />
                <el-option label="广告位" value="广告位" />
                <el-option label="场地" value="场地" />
              </el-select>
            </el-form-item>

          </el-form>
          <div style="width: 18%;">
            <el-button style="background-color: #3F9B6A;color: #fff" @click="onSubmit">查询
            </el-button>
            <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
              @click="resetting">重置
            </el-button>
          </div>

        </div>
        <div style="margin-bottom:20px;">
          <el-button style="background-color: #3F9B6A;color: #fff;padding:8px 15px;" icon="el-icon-circle-plus-outline"
            @click="addbuss">新增</el-button>
        </div>
        <!-- 表格 -->
        <el-table :data="
            tableData.slice(
              (currentPage - 1) * pageSize,
              currentPage * pageSize
            )
          " :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}">
          <el-table-column label="序号" min-width="80">
            <template slot-scope="scope">
              {{scope.$index+1}}
            </template>
          </el-table-column>
          <el-table-column label="意向客户名称" prop="intentCustomerName" min-width="150" />
          <el-table-column label="手机号" prop="phone" min-width="180" />
          <el-table-column label="意向租赁类型" prop="leaseType" min-width="120" />
          <el-table-column label="意向租赁周期" prop="leaseCycle" min-width="120" />
          <el-table-column label="意向租金(月)" prop="rentalRent" min-width="120" />
          <el-table-column label="意向区域" prop="intentionRegion" min-width="120" />
<el-table-column label="审核状态" min-width="120">
            <template slot-scope="scope">
              {{scope.row.auditStatus == 1?'已通过':scope.row.auditStatus == 2?'未通过':'待审核'}}
            </template>
          </el-table-column>
          <el-table-column label="操作" min-width="270" fixed="right">
            <template slot-scope="scope">
              <div class="tableBtn greens" @click="handleEditForm(scope.row)">
                查看
              </div>
              <div class="tableBtn greens" @click="bianjilist(scope.row)">
                编辑
              </div>
              <!-- v-if="scope.row.auditStatus =='1'" -->
              <div class="tableBtn greens" @click="delGuan(scope.row)">
                删除
              </div>
              <!--  <div class="tableBtn greens" @click="chehui(scope.row)" v-if="scope.row.auditStatus =='2'">
                撤回
              </div>
              <div class="tableBtn greens" @click="getshen(scope.row)" v-if="scope.row.auditStatus =='1'">
                提交审核
              </div> -->
              <div class="tableBtn greens" @click="shengRenwu(scope.row)">
                跟进日志
              </div>
              <div class="tableBtn greens" @click="tanRenwu(scope.row)">
                谈判日志
              </div>
              <!-- <div class="tableBtn greens" @click="pipei(scope.row)" v-if="scope.row.auditStatus =='1'">
                一键匹配
              </div> -->
            </template>
          </el-table-column>
        </el-table>
        <!-- <div class="fenye">
          <el-pagination class="pagination" :hide-on-single-page="flag" background small :current-page="currentPage"
            layout="prev, pager, next,total" :total="total" @size-change="handleSizeChange"
            @current-change="handleCurrentChange" />
        </div> -->
        <div style="display: flex;justify-content: space-between;" class="bom">
          <div style="font-size: 14px;">共 <span style="color: #3F9B6A;">{{total}}</span> 条</div>
          <el-pagination :current-page="currentPage" :page-sizes="[10, 20, 50, 100]"
            background small layout="prev, pager, next" :total="total" @size-change="handleSizeChange"
            @current-change="handleCurrentChange">
          </el-pagination>
        </div>
      </div>
    </div>

    <!-- 一键匹配 -->
    <el-dialog :visible.sync="pip" custom-class="tongyong_css" style="padding: 0" width="55%" center
      :close-on-click-modal="false" class="dialog_css_Xq">
      <div style="
              background-color: #fafafa;
              border: 1px solid #eaeaea;
              height: 42px;
              width: 100%;
              padding: 0 20px;
              line-height: 42px;
            ">
        匹配记录
      </div>
      <div style="padding: 0 20px">
        <div style="
                display: flex;
                justify-content: space-between;
                font-size: 14px;

              ">
          <el-form ref="form" :inline="true" :model="pipeiSel" style="padding-top: 10px;">
            <el-form-item label="意向资源类型">
              <el-select v-model="pipeiSel.resources.cereRentalPolicies.businessType" placeholder="请选择"
                style="width:168px">
                <el-option label="商铺" value="sp" />
                <el-option label="广告位" value="gg" />
                <el-option label="场地" value="cd" />
              </el-select>

            </el-form-item>
            <el-form-item label="租期">
              <el-select v-model="pipeiSel.resources.cereRentalPolicies.leaseTerm" style="width:168px">
                <el-option label="年" value="年" />
                <el-option label="月" value="月" />
                <el-option label="日" value="日" />
              </el-select>
            </el-form-item>
            <el-form-item label="租金范围">
              <el-select v-model="pipeiSel.resources.cereRentalPolicies.rentalPrice" placeholder="请选择"
                style="width:168px">
                <el-option label="0-10000" value="0-10000" />
                <el-option label="10000-20000" value="10000-20000" />
                <el-option label="20000-50000" value="20000-50000" />
                <el-option label="50000-100000" value="50000-100000" />
              </el-select>
            </el-form-item>
          </el-form>
          <div style="
                    padding-top: 15px;
                  ">
            <el-button style="background-color: #3F9B6A;color: #fff" @click="pipeiBtn">查询</el-button>
            <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
              @click="pipeiClose">重置</el-button>
          </div>
        </div>
        <!-- <div style="margin-bottom:20px;">
              <el-button style="background-color: #3F9B6A;color: #fff"
              >导出</el-button>
            </div> -->
        <el-table :data="
                pipData.slice(
                  (currentPage - 1) * pageSize,
                  currentPage * pageSize
                )
              " :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}">
          <el-table-column label="序号" min-width="80">
            <template slot-scope="scope">
              {{scope.$index+1}}
            </template>
          </el-table-column>
          <el-table-column label="资源名称" prop="intentCustomerName" min-width="150" />
          <el-table-column label="编号" prop="resourcesId" min-width="150" />
          <el-table-column label="意向资源类型" prop="shopName" min-width="150" />
          <el-table-column label="最近释放日期" prop="businessStartTime" min-width="150" />
          <el-table-column label="最短租期" prop="contactInformation" min-width="150" />
          <el-table-column label="意向租金单价(元/平方)" prop="contactInformation" min-width="250" />
          <el-table-column prop="auditStatus" label="资源状态" min-width="150">
            <template slot-scope="scope">

            </template>
          </el-table-column>

        </el-table>
      </div>
    </el-dialog>

    <!-- 查看 -->
    <div class="zhuti" v-if='detbox'>
      <div style="height:58px;line-height:58px;">
        <div style="color:#0006"> <span>商户寻租管理</span> <span style="padding:0 5px;">></span> <span
            style="color:#000000e6">查看</span></div>
      </div>

      <div style="margin-top: 30px;" class="editcss">
        <TitleWithCircle title="意向信息"></TitleWithCircle>
        <div style="padding: 20px;">
          <el-form :model="secondData" ref="ruleForm" label-width="150px" class="demo-ruleForm">
            <el-row :gutter="20">
              <el-col :span="12">



                <el-form-item label="意向租赁类型" prop="leaseType">
                  <div class="duiqi">{{secondData.leaseType}}</div>

                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="意向租赁周期" prop="leaseCycle">
                  <div class="duiqi">{{secondData.leaseCycle}}</div>

                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="意向租金(月)" prop="rentalRent">
                  <div class="duiqi">{{secondData.rentalRent}}</div>

                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="意向经营类型" prop="operationType">
                  <div class="duiqi">{{secondData.operationType}}</div>

                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="意向区域" prop="intentionRegion">
                  <div class="duiqi">{{secondData.intentionRegion}}</div>
                </el-form-item>
              </el-col>

            </el-row>
            <TitleWithCircle title="商家信息"></TitleWithCircle>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="姓名" prop="intentCustomerName">
                  <div class="duiqi">{{secondData.intentCustomerName}}</div>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="手机号" prop="phone">
                  <div class="duiqi">{{secondData.phone}}</div>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="身份证号码" prop="idCardNumber">
                  <div class="duiqi">{{secondData.idCardNumber}}</div>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="身份证有效期">
                  <div class="duiqi">{{secondData.idCardValidStart}}-{{secondData.idCardValidEnd}}</div>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="身份证照片(正面)" prop="idCardPhotoFront">
                  <div style="display: flex;">
                    <allimg :src="secondData.idCardPhotoFront" fit="contain"
                      style="width: 112px;height: 112px;border: 1px dotted #dcdfe6;border-radius: 2px;overflow: hidden;margin: 0 10px 10px 0;" />
                  </div>
                  <!-- {{idCardPhotoFront}} -->
                  <!-- <el-image :src="$baseURL +secondData.idCardPhotoFront" style="width:140px;height:140px;"></el-image> -->
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="身份证照片(反面)" prop="idCardPhotoBack">
                  <div style="display: flex;">
                    <allimg :src="secondData.idCardPhotoBack" fit="contain"
                      style="width: 112px;height: 112px;border: 1px dotted #dcdfe6;border-radius: 2px;overflow: hidden;margin: 0 10px 10px 0;" />
                  </div>
                  <!-- idCardPhotoBack -->
                  <!-- <el-image :src="$baseURL +secondData.idCardPhotoBack" style="width:140px;height:140px;"></el-image> -->
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
        </div>
      </div>
      <el-row :gutter="20">
        <el-col :span="12">
          <div style="padding-left:160px;">
            <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
              @click="detbox = false">取消</el-button>
          </div>

        </el-col>
      </el-row>
    </div>
    <!-- 新增 -->
    <div class="zhuti" v-if="ggXin">
      <div style="height:58px;line-height:58px;">
        <div style="color:#0006"> <span>商户寻租管理</span> <span style="padding:0 5px;">></span> <span
            style="color:#000000e6">{{edit?'新增':'编辑'}}</span></div>
      </div>
      <div style="margin-top: 30px;">
        <TitleWithCircle title="意向信息"></TitleWithCircle>
        <div style="padding: 20px 20px 20px 0;">
          <el-form ref="AddFromOne" :model="ruleForm" :rules="rulesOne" label-width="150px">
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="意向租赁类型" prop="leaseType">
                  <el-select v-model="ruleForm.leaseType" placeholder="请选择" style="width:100%">
                    <el-option label="商铺" value="商铺" />
                    <el-option label="场地" value="场地" />
                    <el-option label="广告位" value="广告位" />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="意向租赁周期" prop="leaseCycle">
                  <el-input v-model="ruleForm.leaseCycle" placeholder="请输入" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="意向租金(月)" prop="rentalRent" :rules="getCoordinateRules('rentalRent')">
                  <el-input v-model.number="ruleForm.rentalRent" placeholder="请输入" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="意向经营类型" prop="operationType">
                  <el-input v-model="ruleForm.operationType" placeholder="请输入" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="意向区域" prop="intentionRegion">
                  <el-input v-model="ruleForm.intentionRegion" placeholder="请输入" />

                </el-form-item>
              </el-col>
            </el-row>
            <TitleWithCircle title="商家信息"></TitleWithCircle>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="姓名" prop="intentCustomerName">
                  <el-input v-model="ruleForm.intentCustomerName" placeholder="请输入" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="手机号" prop="phone">
                  <el-input v-model.number="ruleForm.phone" placeholder="请输入" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="身份证号码" prop="idCardNumber">
                  <el-input v-model="ruleForm.idCardNumber" placeholder="请输入" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="身份证有效期" prop="idCardValidStart">
                  <el-date-picker v-model="ruleForm.idTime" type="daterange" range-separator="至"
                    start-placeholder="开始时间" end-placeholder="结束时间" value-format="yyyy-MM-dd" style="width:100%"
                    @change="idCardchange" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="身份证照片(正面)" prop="idCardPhotoFront">
                  <upimg filePath="yixiang" inputtype="idCardPhotoFront" :value="ruleForm.idCardPhotoFront"
                    @changimg="e=>changimg(e,'idCardPhotoFront')" :limit="1"></upimg>

                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="身份证照片(反面)" prop="idCardPhotoBack">
                  <upimg filePath="yixiang" inputtype="idCardPhotoBack" :value="ruleForm.idCardPhotoBack"
                    @changimg="e=>changimg(e,'idCardPhotoBack')" :limit="1"></upimg>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item>
                  <div style="margin-top: 20px">
					  <el-button class="buttonHover"
					    style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" @click="closeFn">取
					    消</el-button>
                    <el-button style="background-color: #3F9B6A;color: #fff" @click="addCheck">确 定</el-button>
                    

                  </div>

                </el-form-item>
              </el-col>
            </el-row>

          </el-form>
        </div>
      </div>
    </div>
    <genjin v-if="genjinShow" @cancel="cancel" :message="genjinId"></genjin>
    <tanpan v-if="tanpanShow" @cancel="tancel" :message="genjinId"></tanpan>
  </div>
</template>

<script>
  import {
    uploadUrl,
    token
  } from '@/utils/request'
  import {
    rsaManAll,
    rsaManAdd,
    rsaManEdit,
    rsaManDel,
    ziyuanduiy,
  } from '../../../api/rsaManagement'
  import {
    icManAdd,
  } from '../../../api/icManagement';
  import {
    genAdd,
  } from '../../../api/followup.js'
  import {
    getAlls
  } from '../../../api/information.js'
  import {
    getAlls as map1
  } from '../../../api/map1'
  import upimg from "@/components/ImageUpload/index"
  import TitleWithCircle from '@/components/top/index';
  import genjin from './genjin';
  import tanpan from './tanpan';
  import allimg from '@/components/chakan/allimg.vue';
  export default {
    components: {
      upimg,
      TitleWithCircle,
      genjin,
      tanpan,
      allimg
    },

    data() {
      return {
        detbox: false, // 详情
        edit: true, // 编辑
        addMing: false, //资源
        selshop: [], //意向资源列表
        action: uploadUrl, // 上传图片
        myHeaders: {
          'Authorization-admin': token
        },
        ggXin: false, // 新增
        sel: [], // 选择资源
        stepNum: 0, // 切换
        formSel: {
          intentCustomerName: '',
          leaseType: '',
          pageNumber: 0,
          pageSize: 10,
		  auditStatus:'1'
        },
        ruleForm: {
          intentCustomerName: '', //意向客户名称
          leaseType: '', //租赁类型
          leaseCycle: '', //租赁周期
          rentalRent: null, //意向租金
          operationType: '', //经营类型
          intentionRegion: '', //意向区域
          idCardNumber: '', //身份证号
          idCardType: '', //证件类型
          phone: null, //手机号
          idTime: [],
          idCardValidStart: '', //身份证有效开始时间
          idCardValidEnd: '', //身份证有效结束时间
          idCardPhotoFront: '', //身份证照片(正面)
          idCardPhotoBack: '', //身份证照片(反面)
          source: 0
        },

        secondData: {},
        currentPage: 1,
        total: 0,
        flag: false,
        pageSize: 10,
        tableData: [],
        pageindex: {
          pageNumber: 0,
          pageSize: 10,
		  auditStatus:'1'
        },
        ziyuanData: [],
        multipleSelection: [],
        pip: false,
        pipData: [],
        pipeiSel: {
          resources: {
            cereRentalPolicies: {
              businessType: '',
              leaseTerm: '',
              rentalPrice: ''
            }
          },
          pageNumber: 0,
          pageSize: 10,
        },

        rulesOne: {

          intentCustomerName: [{
            required: true,
            message: '请输入姓名',
            trigger: 'blur'
          }, ],
          leaseType: [{
            required: true,
            message: '请选择租赁类型',
            trigger: 'change'
          }],
          leaseCycle: [{
            required: true,
            message: '请输入租赁周期',
            trigger: 'blur'
          }, ],
          // rentalRent: [{
          //   required: true,
          //   message: '请输入意向租金(月)',
          //   trigger: 'blur'
          // }, ],
          operationType: [{
            required: true,
            message: '请输入经营类型',
            trigger: 'blur'
          }, ],
          intentionRegion: [{
            required: true,
            message: '请输入意向区域',
            trigger: 'blur'
          }, ],
          idCardNumber: [{
            required: true,
            message: '请输入身份证号',
            trigger: 'blur'
          }, ],
          phone: [{
            required: true,
            message: '请输入手机号',
            trigger: 'blur'
          }, {
            pattern: /^[0-9]+$/,
            message: '手机号只能包含数字',
            trigger: 'blur',
          }],
          idCardValidStart: [{
            required: true,
            message: '请选择身份证有效时间',
            trigger: 'change'
          }, ],
          idCardPhotoFront: [{
            required: true,
            message: '请输入身份证照片(正面)',
            trigger: 'change'
          }, ],
          idCardPhotoBack: [{
            required: true,
            message: '请选择身份证照片(反面)',
            trigger: 'change'
          }, ],
        },
        genjinId: '',
        genjinShow: false,
        tanpanShow: false,
      }
    },

    created() {
      this.getAll();
    },
    mounted() {},
    // beforeDestroy() {
    //   const editor = this.editor
    //   if (editor == null) return
    //   editor.destroy() // 组件销毁时,及时销毁编辑器
    // },
    methods: {
      getCoordinateRules(coord) {
        return [{
            required: true,
            message: `意向租金不能为空且必须是数字`,
            trigger: 'blur'
          },
          {
            pattern: /^(\d+|\d*\.\d{1,10})$/,
            message: `意向租金为整数或最多三位小数,`,
            trigger: 'blur'
          },

        ]
      },
      changimg(e, type) {
        this.ruleForm[type] = e
      },
      // 获取当前时间
      updateCurrentTime() {
        const now = new Date();
        const year = now.getFullYear();
        const month = (now.getMonth() + 1).toString().padStart(2, '0');
        const day = now.getDate().toString().padStart(2, '0');
        const hours = now.getHours().toString().padStart(2, '0');
        const minutes = now.getMinutes().toString().padStart(2, '0');
        const seconds = now.getSeconds().toString().padStart(2, '0');

        return `${year}-${month}-${day} ${hours}:${minutes}`;
      },
      handleSelectionChange(val) {
        this.multipleSelection = val;
      },
      lextStep(val) {
        if (val == 0) {
          this.stepNum = this.stepNum - 1;
        } else {
          this.stepNum = this.stepNum + 1;
        }
      },
      // 查询全数据
      async getAll() {
        const res = await rsaManAll(this.pageindex);
        this.tableData = res.data.content;
        this.total = res.data.content.length
        const ziyuan = await getAlls(this.pageindex)
        const ggw = await map1(this.pageindex)
        this.ziyuanData = [...ziyuan.data.content, ...ggw.data.content]
      },
      // 编辑确认
      async msgeditS() {
        await rsaManEdit(this.ruleForm);
        this.ggXin = false
        this.getAll()
      },
      // 编辑
      bianjilist(item) {
        this.ruleForm = item
        this.ruleForm.idTime = []
        this.ruleForm.idTime[0] = item.idCardValidStart
        this.ruleForm.idTime[1] = item.idCardValidEnd
        if (this.edit) {
          this.edit = false
        }
        this.ggXin = true
      },
      async chehui(item) {
        await rsaManEdit({
          id: item.id,
          auditStatus: '1'
        })
        this.getAll()
      },
      async getshen(item) {
        await rsaManEdit({
          id: item.id,
          auditStatus: '2'
        })
        this.getAll()
      },


      // 详情点击
      handleEditForm(item) {
        this.secondData = item
        this.detbox = true
      },
      // 新增
      addbuss() {
        this.ruleForm = {
          intentCustomerName: '', //意向客户名称
          leaseType: '', //租赁类型
          leaseCycle: '', //租赁周期
          rentalRent: null, //意向租金
          operationType: '', //经营类型
          intentionRegion: '', //意向区域
          idCardNumber: '', //身份证号
          idCardType: '', //证件类型
          phone: null, //手机号
          idTime: [],
          idCardValidStart: '', //身份证有效开始时间
          idCardValidEnd: '', //身份证有效结束时间
          idCardPhotoFront: '', //身份证照片(正面)
          idCardPhotoBack: '', //身份证照片(反面)
          source: 0
        }
        this.edit = true
        this.ggXin = true
        this.getAll();
      },
      idCardchange(e) {

        this.ruleForm.idCardValidStart = e[0]
        this.ruleForm.idCardValidEnd = e[1]

      },
      // 新增确定
      addCheck() {

        this.$refs.AddFromOne.validate((valid) => {
          if (valid) {
            if (this.edit) {
              rsaManAdd(this.ruleForm).then(res => {
                icManAdd(this.ruleForm).then(res => {
                  this.$message({
                    message: '保存成功',
                    type: 'success'
                  })
                  this.getAll();
                  this.ggXin = false
                  this.$refs.AddFrom.resetFields()
                })

              })
            } else {
              rsaManEdit(this.ruleForm).then(res => {
                this.$message({
                  message: '修改成功',
                  type: 'success'
                })
                this.getAll();
                this.ggXin = false
                this.$refs.AddFrom.resetFields()
              })
            }

          } else {
            this.$message({
              message: '请填写完整信息',
              type: 'error'
            })

          }
        })
      },
      handleCurrentChange(val) {
        this.currentPage = val;
      },
      handleSizeChange(val) {
        this.pageSize = val;
      },
      // 取消
      closeFn(val) {
        this.getAll()
        this.ggXin = false;

      },
      //删除管理列表
      async delGuan(item) {
        const h = this.$createElement;
        this.$msgbox({
          title: '消息',
          message: h('p', null, [
            h('span', null, '是否删除 '),
          ]),
          showCancelButton: true,
          showClose: false,
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          customClass: 'oe-dialog-btn',
          beforeClose: (action, instance, done) => {
            if (action === 'confirm') {
              rsaManDel({
                id: item.id
              }).then(res => {
                this.$message({
                  message: '删除成功',
                  type: 'success'
                })
                this.getAll()
                done();
              })
            } else {
              done();
            }
          }
        })

      },

      // 重置按钮
      resetting() {
        this.formSel = {
          intentCustomerName: '',
          leaseType: '',
          pageNumber: 0,
          pageSize: 10,
		  auditStatus:'1'
        }
        this.currentPage = 1
        this.getAll()
      },
      // 查询
      async onSubmit() {
        const res = await rsaManAll(this.formSel)
        this.currentPage = 1
        this.tableData = res.data.content
        this.total = res.data.content.length
      },
      mingClose() {
        this.multipleSelection = []
        this.addMing = false

      },
      minSev() {
        this.selshop = this.multipleSelection
        this.addMing = false
        this.multipleSelection = []
      },
      pipei(item) {
        this.pip = true
        this.pipData = []
      },
      shengRenwu(item) {
        this.genjinId = item.id
        this.genjinShow = true
        // genAdd({
        //   potentialCustomer: item.id,
        //   status: '1'
        // }).then(res => {
        //   this.$message({
        //     message: '生成成功',
        //     type: 'success'
        //   })
        // })

      },
      tanRenwu(item) {
        this.genjinId = item.id
        this.tanpanShow = true
      },
      pipeiBtn() {
        if (this.pipeiSel.resources.cereRentalPolicies.businessType == 'sp') {
          this.pipeiSel.resourcesId = 'sp'
        } else if (this.pipeiSel.resources.cereRentalPolicies.businessType == 'cd') {
          this.pipeiSel.resourcesId = 'cd'
        } else {
          this.pipeiSel.resourcesId = 'gg'
        }
        ziyuanduiy(this.pipeiSel).then(res => {
          this.pipData = res.data.content
        })
      },
      pipeiClose() {
        this.pipeiSel = {
            resources: {
              cereRentalPolicies: {
                businessType: '',
                leaseTerm: '',
                rentalPrice: ''
              }
            },
            resourcesId: '',
            pageNumber: 1,
            pageSize: 10,
          },
          this.pipData = []
      },
      cancel(e) {
        this.genjinShow = e
        this.getAll()
      },
      tancel(e) {
        this.tanpanShow = e
        this.getAll()
      },
    }
  }
</script>
<style scoped>
  .zhuti {
    padding: 0 20px 20px 20px;
    min-height: calc(100vh - 50px - 20px);
    background-color: #Fff;

  }
  .chengeXia {
    border-bottom: 6px solid #3F9B6A;
    padding-bottom: 4px;
    color: #3F9B6A;
  }


  .formSearch {
    display: flex;
    width: 100%;
    font-size: 14px;
    justify-content: space-between;
  }
  .greens {
    color: #3F9B6A;
  }
  .bg-purple-dark {
    background: #99a9bf;
  }

  .bg-purple {
    background: #d3dce6;
  }

  .bg-purple-light {
    background: #e5e9f2;
  }
  .grid-content {
    border-radius: 4px;
    min-height: 36px;
  }

</style>
<style lang="scss" scoped>
  ::v-deep .el-dialog__body {
    padding: 0 0 !important;
  }
  .el-dialog__header{
    padding: 0;
    display: none;
  }
</style>