financialInformation.vue 29 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
<template>
  <a-spin :spinning="confirmLoading">
    <a-form-model ref="form" :model="caiwu" :rules="validatorRules">
      <a-card title="资产信息" :bordered="false">
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-model-item
              prop="moneyAssets"
              label="货币资金(元)"
              :labelCol="{ span: 8 }"
              :wrapperCol="{ span: 16 }"
            >
              <a-input
                placeholder="请输入货币资金(元)"
                v-model="caiwu.moneyAssets"
                :readOnly="onlyread && disableSubmit"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12" v-if="businessChannelNo == 'NBD'">
            <a-form-model-item
              prop="cowAssets"
              label="生物资产(存栏牛活体)(元)"
              :labelCol="{ span: 10 }"
              :wrapperCol="{ span: 14 }"
            >
              <a-input
                placeholder="请输入生物资产"
                v-model="caiwu.cowAssets"
                :readOnly="onlyread && disableSubmit"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12" v-if="businessChannelNo == 'NBD'">
            <a-form-model-item
              prop="stockAssets"
              label="存货(饲料、青贮等)(元)"
              :labelCol="{ span: 10 }"
              :wrapperCol="{ span: 14 }"
            >
              <a-input
                placeholder="请输入存货(饲料、青贮等)(元)"
                v-model="caiwu.stockAssets"
                :readOnly="onlyread && disableSubmit"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item
              prop="reciveAssets"
              label="应收账款(元)"
              :labelCol="{ span: 8 }"
              :wrapperCol="{ span: 16 }"
            >
              <a-input
                placeholder="请输入应收账款(元)"
                v-model="caiwu.reciveAssets"
                :readOnly="onlyread && disableSubmit"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item
              prop="reciveAssetsElse"
              label="其他应收账款(元)"
              :labelCol="{ span: 8 }"
              :wrapperCol="{ span: 16 }"
            >
              <a-input
                placeholder="请输入其他应收账款(元)"
                v-model="caiwu.reciveAssetsElse"
                :readOnly="onlyread && disableSubmit"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12" v-if="businessChannelNo == 'NBD'">
            <a-form-model-item
              prop="fixedAssets"
              label="其他固定资产(场舍、设备等)(元)"
              :labelCol="{ span: 12 }"
              :wrapperCol="{ span: 12 }"
            >
              <a-input
                placeholder="请输入其他固定资产(场舍、设备等)(元)"
                v-model="caiwu.fixedAssets"
                :readOnly="onlyread && disableSubmit"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item prop="" label="资产合计(元)" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
              <a-input placeholder="请输入资产合计(元)" v-model="ziNum" :readOnly="onlyread && disableSubmit" @click="moneyAdd"
                @blur.native.capture="moneyEdit" />
              <!-- v-model="['assetsSum', { initialValue: caiwu ? caiwu.assetsSum : '', }]" -->
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24" v-show="!disableSubmit" style="float: right; margin-right: 20px">
          <!-- <a-button style="margin-right:10px;" @click="handleCancel">取消</a-button> -->
          <a-button type="primary" @click="handleSubmit" :disabled="watchBtn1">保存</a-button>
        </a-row>
      </a-card>
    </a-form-model>
    <a-form-model ref="form2" :model="caiwu" :rules="validatorRules2">
      <a-card title="负债信息" :bordered="false">
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-model-item prop="debt" label="有息负债(元)" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
              <a-input placeholder="请输入有息负债(元)" v-model="caiwu.debt" :readOnly="onlyread && disableSubmit" @click="moneyAdd"
                @blur.native.capture="moneyEdit" />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item
              prop="debtPayment"
              label="应付账款(元)"
              :labelCol="{ span: 8 }"
              :wrapperCol="{ span: 16 }"
            >
              <a-input
                placeholder="请输入保费总计(元)"
                v-model="caiwu.debtPayment"
                :readOnly="onlyread && disableSubmit"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-model-item
              prop="debtPaymentElse"
              label="其他应付账款(元)"
              :labelCol="{ span: 8 }"
              :wrapperCol="{ span: 16 }"
            >
              <a-input
                placeholder="请输入其他应付账款(元)"
                v-model="caiwu.debtPaymentElse"
                :readOnly="onlyread && disableSubmit"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item prop="" label="负债合计(元)" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
              <a-input placeholder="请输入负债合计(元)" v-model="fuNum" :readOnly="onlyread && disableSubmit" @click="moneyAdd"
                @blur.native.capture="moneyEdit"/>
              <!-- v-model="['debtSum', { initialValue: caiwu ? caiwu.debtSum : '', }]" -->
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24" v-show="!disableSubmit" style="float: right; margin-right: 20px">
          <!-- <a-button style="margin-right:10px;" @click="handleCancel">取消</a-button> -->
          <a-button type="primary" @click="handleSubmit2" :disabled="watchBtn1">保存</a-button>
        </a-row>
      </a-card>
    </a-form-model>
    <a-form-model ref="form3" :model="caiwu" :rules="validatorRules3">
      <a-card title="收支信息" :bordered="false">
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-model-item
              prop="saleIncome"
              label="销售收入(元)"
              :labelCol="{ span: 8 }"
              :wrapperCol="{ span: 16 }"
            >
              <a-input
                placeholder="请输入销售收入(元)"
                v-model="caiwu.saleIncome"
                :readOnly="onlyread && disableSubmit"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item
              prop="otherIncome"
              label="其他收入(元)"
              :labelCol="{ span: 8 }"
              :wrapperCol="{ span: 16 }"
            >
              <a-input
                placeholder="请输入其他收入(元)"
                v-model="caiwu.otherIncome"
                :readOnly="onlyread && disableSubmit"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-model-item prop="" label="收入合计(元)" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
              <a-input placeholder="请输入收入合计(元)" v-model="shouNum" :readOnly="onlyread && disableSubmit" @click="moneyAdd"
                @blur.native.capture="moneyEdit"/>
              <!-- v-model="['incomeSum', { initialValue: caiwu ? caiwu.incomeSum : '', }]" -->
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24" v-if="businessChannelNo == 'NBD'">
          <a-col :span="12">
            <a-form-model-item
              prop="cowExpend"
              label="牛采购支出(元)"
              :labelCol="{ span: 8 }"
              :wrapperCol="{ span: 16 }"
            >
              <a-input
                placeholder="请输入牛采购支出(元)"
                v-model="caiwu.cowExpend"
                :readOnly="onlyread && disableSubmit"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item
              prop="feedExpend"
              label="饲料采购支出(元)"
              :labelCol="{ span: 8 }"
              :wrapperCol="{ span: 16 }"
            >
              <a-input
                placeholder="请输入饲料采购支出(元)"
                v-model="caiwu.feedExpend"
                :readOnly="onlyread && disableSubmit"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-model-item
              prop="otherExpend"
              label="运营支出(元)"
              :labelCol="{ span: 8 }"
              :wrapperCol="{ span: 16 }"
            >
              <a-input
                placeholder="请输入运营支出(元)"
                v-model="caiwu.otherExpend"
                :readOnly="onlyread && disableSubmit"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item
              prop="interestExpend"
              label="利息支出(元)"
              :labelCol="{ span: 8 }"
              :wrapperCol="{ span: 16 }"
            >
              <a-input
                placeholder="请输入利息支出(元)"
                v-model="caiwu.interestExpend"
                :readOnly="onlyread && disableSubmit"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-model-item prop="" label="支出合计(元)" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
              <a-input placeholder="请输入支出合计(元)" v-model="zhiNum" :readOnly="onlyread && disableSubmit" />
              <!-- v-model="['expendSum', { initialValue: caiwu ? caiwu.expendSum : '', }]" -->
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24" v-show="!disableSubmit" style="float: right; margin-right: 20px">
          <!-- <a-button style="margin-right:10px;" @click="handleCancel">取消</a-button> -->
          <a-button type="primary" @click="handleSubmit3" :disabled="watchBtn1">保存</a-button>
        </a-row>
      </a-card>
    </a-form-model>
    <a-form-model ref="form4" :model="caiwu" :rules="validatorRules4">
      <a-card title="核心指标" :bordered="false">
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-model-item
              prop="yearInterestRate"
              label="年销售利润率(%)"
              :labelCol="{ span: 8 }"
              :wrapperCol="{ span: 16 }"
            >
              <a-input
                placeholder="请输入年销售利润率(%)"
                v-model="caiwu.yearInterestRate"
                :readOnly="onlyread && disableSubmit"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item
              prop="reciveAccountPeriod"
              label="应收账款平均账期(天)"
              :labelCol="{ span: 8 }"
              :wrapperCol="{ span: 16 }"
            >
              <a-input
                placeholder="请输入应收账款平均账期(天)"
                v-model="caiwu.reciveAccountPeriod"
                :readOnly="onlyread && disableSubmit"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-model-item
              prop="payAccountPeriod"
              label="应付账款平均账期(天)"
              :labelCol="{ span: 8 }"
              :wrapperCol="{ span: 16 }"
            >
              <a-input
                placeholder="请输入应付账款平均账期(天)"
                v-model="caiwu.payAccountPeriod"
                :readOnly="onlyread && disableSubmit"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item
              prop="stockTurnoverDays"
              label="存货平均周转天数(天)"
              :labelCol="{ span: 8 }"
              :wrapperCol="{ span: 16 }"
            >
              <a-input
                placeholder="请输入存货平均周转天数(天)"
                :readOnly="onlyread && disableSubmit"
                v-model="caiwu.stockTurnoverDays"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-model-item
              prop="prePayAccountPeriod"
              label="预付账款周转天数"
              :labelCol="{ span: 8 }"
              :wrapperCol="{ span: 16 }"
            >
              <a-input
                placeholder="请输入预付账款周转天数"
                :readOnly="onlyread && disableSubmit"
                v-model="caiwu.prePayAccountPeriod"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item
              prop="preReciveAccountPeriod"
              label="预收账款周转天数"
              :labelCol="{ span: 8 }"
              :wrapperCol="{ span: 16 }"
            >
              <a-input
                placeholder="请输入预收账款周转天数"
                :readOnly="onlyread && disableSubmit"
                v-model="caiwu.preReciveAccountPeriod"
                @click="moneyAdd"
                @blur.native.capture="moneyEdit"
              />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24" v-show="!disableSubmit" style="float: right; margin-right: 20px">
          <!-- <a-button style="margin-right:10px;" @click="handleCancel">取消</a-button> -->
          <a-button type="primary" @click="handleSubmit4" :disabled="watchBtn1">保存</a-button>
        </a-row>
      </a-card>
      <a-card title="有息负债情况" :bordered="false">
        <liabilities
          ref="liabilities"
          :debtInfoList.sync="debtInfoList"
          :zong.sync="zong"
          @liabeditReload="liabeditReload"
          :disShow.sync="disableSubmit"
        ></liabilities>
      </a-card>
      <a-card title="或有负债(对外担保)情况" :bordered="false">
        <danbaoList
          ref="liabilities"
          :contingentLiabilityList.sync="contingentLiabilityList"
          :zong.sync="zong"
          @liabeditReload="liabeditReload"
          :disShow.sync="disableSubmit"
        ></danbaoList>
      </a-card>
      <div v-show="!disableSubmit" style="float: right; margin-right: 20px; margin-top: 30px; margin-bottom: 30px">
        <a-button style="margin-right: 10px" @click="handleCancel">取消</a-button>
        <a-button type="primary" @click="handleOk">确定</a-button>
      </div>
    </a-form-model>
  </a-spin>
</template>
<script>
function getBase64(img, callback) {
  const reader = new FileReader()
  reader.addEventListener('load', () => callback(reader.result))
  reader.readAsDataURL(img)
}
import JDictSelectTag from '@/components/dict/JDictSelectTag.vue'
import pick from 'lodash.pick'
import moment from 'moment'
import { JeecgListMixin } from '@/mixins/CoreListMixin'
import { updateCustomerFinanceInfo } from '@/api/configApi'
import liabilities from './liabilities'
import danbaoList from './danbaoList'
export default {
  name: 'PersonalInformationListModal',
  mixins: [JeecgListMixin],
  components: {
    liabilities,
    danbaoList,
  },
  props: {
    caiwu: {
      type: Object,
      // default: () => {
      //   return [];
      // }
    },
    productNo: {
      type: String,
      default: '',
    },
    businessChannelNo: {
      type: String,
      default: '',
    },
    applyNo: {
      type: String,
      default: '',
    },
    debtInfoList: {
      type: Array,
      default: () => {
        return []
      },
    },
    contingentLiabilityList: {
      type: Array,
      default: () => {
        return []
      },
    },
    zong: {
      type: String,
      default: '',
    },
    disableSubmit: {
      type: Boolean,
      default: false,
    },
    onlyread: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      visible: false,
      confirmLoading: false,
      title: '',
      imageUrlFront: '',
      imageUrlBack: '',
      // disableSubmit: false,
      // onlyread: false,
      id: '',
      defaultTabKey: '',
      programOffices: JSON.parse(sessionStorage.getItem('PROGRAMOFFICES')), // 组织机构
      dbCollectionInfo: JSON.parse(sessionStorage.getItem('DB_COLLECTION_INFO')), // 进件流编号
      dbBusinessChannel: JSON.parse(sessionStorage.getItem('DB_BUSINESS_CHANNEL')), // 业务线名称
      dbCooPerationPlatform: JSON.parse(sessionStorage.getItem('DB_COOPERATION_PLATFORM')), // 合作平台
      dbProductCategory: JSON.parse(sessionStorage.getItem('DB_PRODUCT_CATEGORY')), // 产品分类
      creditList: '',
      model: {},
      form: this.$form.createForm(this),
      form2: this.$form.createForm(this),
      form3: this.$form.createForm(this),
      form4: this.$form.createForm(this),
      dateFormat: 'YYYY-MM-DD',
      disableMixinCreated: true,
      url: {
        upload: window._CONFIG['uploadUrl'],
      },
      headers: {
        'X-Access-Token': this.$store.state.user.token,
      },
      validatorRules: {},
      validatorRules2: {},
      validatorRules3: {},
      validatorRules4: {},
      watchBtn1: true,
      updateCount: 0,
    }
  },
  computed: {
    ziNum() {
      let a =
        Number(this.caiwu.moneyAssets) +
        Number(this.caiwu.cowAssets) +
        Number(this.caiwu.stockAssets) +
        Number(this.caiwu.reciveAssets) +
        Number(this.caiwu.reciveAssetsElse) +
        Number(this.caiwu.fixedAssets)
      let b = a.toFixed(2)
      return b || 0
    },
    fuNum() {
      let a = Number(this.caiwu.debt) + Number(this.caiwu.debtPayment) + Number(this.caiwu.debtPaymentElse)
      let b = a.toFixed(2)
      return b || 0
    },
    shouNum() {
      // return Number(this.caiwu.saleIncome) + Number(this.caiwu.otherIncome) || 0
      let a = Number(this.caiwu.saleIncome) + Number(this.caiwu.otherIncome)
      let b = a.toFixed(2)
      return b || 0
    },
    zhiNum() {
      let a =
        Number(this.caiwu.cowExpend) +
        Number(this.caiwu.feedExpend) +
        Number(this.caiwu.otherExpend) +
        Number(this.caiwu.interestExpend)
      let b = a.toFixed(2)
      return b || 0
    },
  },
  watch: {
    caiwu: {
      handler(val) {
        if (val) {
          this.updateCount++
          if (this.updateCount > 1) {
            this.watchBtn1 = false
            console.log(this.updateCount)
          }
        }
      },
      deep: true,
    },
  },
  methods: {
    moment,
    edit(res, applyNo) {
      this.defaultTabKey = '1'
      // console.log("ssss",res)
      // console.log("hhh",res.cusBankAccountResponses)
      this.assignment(res)
      this.id = res.cusBankAccountResponses.id
      this.form.resetFields()
      // this.form2.resetFields()
      this.visible = true
      this.$nextTick(() => {})
    },
    add() {
      this.model = {}
      this.form.resetFields()
      this.visible = true
      this.$nextTick(() => {})
    },

    close() {
      this.$emit('close')
      this.visible = false
      this.disableSubmit = false
      this.selectedRole = []
    },
    resetFields() {
      this.form.resetFields()
      this.form2.resetFields()
      this.form3.resetFields()
      this.form4.resetFields()
    },
    handleSubmit() {
      // 触发表单验证
      this.$refs.form.validate((valid) => {
        if (valid) {
          this.confirmLoading = true
          console.log(this.caiwu)
          this.caiwu.applyNo = this.applyNo
          this.caiwu.assetsSum = Number(this.ziNum)
          let formData = this.caiwu
          // console.log(a)
          updateCustomerFinanceInfo(formData)
            .then((res) => {
              if (res.status.statusCode == 0) {
                this.$message.success(res.status.statusReason)
                this.$emit('editReload')
                this.updateCount = 0
                this.watchBtn1 = true
              } else {
                this.$message.warning(res.status.statusReason)
              }
            })
            .finally(() => {
              this.confirmLoading = false
              this.close()
              this.updateCount = 0
              this.watchBtn1 = true
            })
        }
      })
    },
    handleSubmit2() {
      // 触发表单验证
      this.$refs.form2.validate((valid) => {
        if (valid) {
          this.confirmLoading = true
          console.log(this.caiwu)
          this.caiwu.applyNo = this.applyNo
          this.caiwu.debtSum = Number(this.fuNum)
          let formData = this.caiwu
          // console.log(a)
          updateCustomerFinanceInfo(formData)
            .then((res) => {
              if (res.status.statusCode == 0) {
                this.$message.success(res.status.statusReason)
                this.$emit('editReload')
                this.updateCount = 0
                this.watchBtn1 = true
              } else {
                this.$message.warning(res.status.statusReason)
              }
            })
            .finally(() => {
              this.confirmLoading = false
              this.close()
              this.updateCount = 0
              this.watchBtn1 = true
            })
        }
      })
    },
    handleSubmit3() {
      // 触发表单验证
      this.$refs.form3.validate((valid) => {
        if (valid) {
          this.confirmLoading = true
          console.log(this.caiwu)
          this.caiwu.applyNo = this.applyNo
          this.caiwu.incomeSum = Number(this.shouNum)
          this.caiwu.expendSum = Number(this.zhiNum)
          let formData = this.caiwu
          // console.log(a)
          updateCustomerFinanceInfo(formData)
            .then((res) => {
              if (res.status.statusCode == 0) {
                this.$message.success(res.status.statusReason)
                this.$emit('editReload')
                this.updateCount = 0
                this.watchBtn1 = true
              } else {
                this.$message.warning(res.status.statusReason)
              }
            })
            .finally(() => {
              this.confirmLoading = false
              this.close()
              this.updateCount = 0
              this.watchBtn1 = true
            })
        }
      })
    },
    handleSubmit4() {
      // 触发表单验证
      this.$refs.form4.validate((valid) => {
        if (valid) {
          this.confirmLoading = true
          console.log(this.caiwu)
          this.caiwu.applyNo = this.applyNo
          this.caiwu.incomeSum = Number(this.shouNum)
          this.caiwu.expendSum = Number(this.zhiNum)
          this.caiwu.debtSum = Number(this.fuNum)
          this.caiwu.assetsSum = Number(this.ziNum)
          let formData = this.caiwu
          // console.log(a)
          updateCustomerFinanceInfo(formData)
            .then((res) => {
              if (res.status.statusCode == 0) {
                this.$message.success(res.status.statusReason)
                this.$emit('editReload')
                this.updateCount = 0
                this.watchBtn1 = true
              } else {
                this.$message.warning(res.status.statusReason)
              }
            })
            .finally(() => {
              this.confirmLoading = false
              this.close()
              this.updateCount = 0
              this.watchBtn1 = true
            })
        }
      })
    },
    handleOk() {
      this.$refs.form.validate((valid) => {
        if (!valid) {
          return false
        }
      })
      this.$refs.form2.validate((valid) => {
        if (!valid) {
          return false
        }
      })
      this.$refs.form3.validate((valid) => {
        if (!valid) {
          return false
        }
      })
      this.$refs.form4.validate((valid) => {
        if (valid) {
          this.confirmLoading = true
          console.log(this.caiwu)
          let applyNo = { applyNo: this.applyNo }
          let assetsSum = { assetsSum: Number(this.ziNum) }
          let debtSum = { debtSum: Number(this.fuNum) }
          let incomeSum = { incomeSum: Number(this.shouNum) }
          let expendSum = { expendSum: Number(this.zhiNum) }
          let formData = Object.assign(applyNo, this.caiwu, assetsSum, debtSum, incomeSum, expendSum)
          // console.log(a)
          updateCustomerFinanceInfo(formData)
            .then((res) => {
              if (res.status.statusCode == 0) {
                this.$message.success(res.status.statusReason)
                this.$emit('editReload')
                this.updateCount = 0
                this.watchBtn1 = true
              } else {
                this.$message.warning(res.status.statusReason)
              }
            })
            .finally(() => {
              this.confirmLoading = false
              this.close()
              this.updateCount = 0
              this.watchBtn1 = true
            })
        }
      })
    },
    handleCancel() {
      this.$emit('handleCancel')
    },
    // tabs 回调
    callback(key) {
      if (key == 7) {
        this.$refs.approval.loadData()
      }
    },
    liabeditReload() {
      this.$emit('editReload')
    },
    moneyAdd(val) {
      // console.log("ssss",val.target.value)
      if (val.target.value == 0) {
        val.target.value = ''
        this.updateCount = 0
      }
    },
    moneyEdit(val) {
      // console.log("aaaaaa",val.target.value)
      if (val.target.value == '') {
        val.target.value = 0
        this.updateCount = 0
      }
    },
    assignment(res) {
      // this.model = res ? res : {}
      // this.collPersonalApply = this.model.collPersonalApply
      // this.caiwu = this.model.cusBasicInfoResponse
      // //console.log("111111", this.caiwu)
      // if (this.caiwu) {
      //   this.imageUrlFront = this.caiwu.idCardUrl
      //   this.imageUrlBack = this.caiwu.idCardBackUrl
      // } else {
      //   this.imageUrlFront = ''
      //   this.imageUrlBack = ''
      // }
      // this.collCusContactInfoList = this.model.collCusContactInfoList
      // this.collCusBankAccountList = this.model.cusBankAccountResponses
      // this.collCusExtAttachmentList = this.model.collCusExtAttachmentList
      // this.collCusExtObjDataList = this.model.collCusExtObjDataList
      // this.collCreditStatusList = this.model.collCreditStatusList
      // this.financingInformation = this.model.financingApplyInfoResponse
    },
  },
}
</script>
<style>
.scope-person .ant-modal-body {
  padding: 0 24px !important;
}

.scope-person .ant-modal-body {
  overflow-y: scroll;
  min-height: 600px;
  max-height: 600px !important;
}

.scope-person .ant-tabs-bar {
  margin-bottom: 0;
}

.scope-person .ant-card-body {
  padding: 10px 24px;
}

.scope-person .ant-layout-sider {
  flex: 0 0 300px;
  max-width: 300px !important;
  min-width: 300px !important;
  width: 300px !important;
}

.scope-person .ant-modal-footer {
  display: none;
}

.scope-person .scoped-img img {
  width: 200px;
}
</style>