PersonalInformationListModal.vue 13.8 KB
<template>
  <a-modal
    :maskClosable="false"
    :title="title"
    :width="1000"
    :centered="false"
    :visible="visible"
    :okButtonProps="{ props: {disabled: disableSubmit} }"
    :confirmLoading="confirmLoading"
    @ok="handleSubmit"
    @cancel="handleCancel"
    cancelText
    style="top:20px;"
    class="scoped-person"
  >
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <a-card title="融资主体信息" v-if="typeFlag==1" :bordered="false">
          <!-- <a-row :gutter="24">
                <a-col :span="12">
                  <a-form-item label="进件流编号" :labelCol="{span:8}" :wrapperCol="{span:16}">
                    <a-select v-decorator="[ 'collectionNo', {'initialValue':recodes?recodes.collectionNo:'',rules:[{required: true,message: '请选择进件流编号'}]}]" :disabled="!!recodes.collectionNo" placeholder="请选择进件流编号">
                      <a-select-option v-for="(item, index) in creditList" :key="index" :value="item.collectionNo">
                          {{item.collectionName}}
                        </a-select-option>
                    </a-select>
                  </a-form-item>
                </a-col>
          </a-row>-->
          <a-row :gutter="24">
            <a-col :span="12">
              <a-form-item label="客户名称" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.customerName||'暂无'}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="身份证号码" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.idCardNo||'暂无'}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="手机号" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.mobilePhoneView||'暂无'}}</p>
              </a-form-item>
            </a-col>
          </a-row>
        </a-card>
        <a-card title="融资主体信息" v-if="typeFlag==2" :bordered="false">
          <a-row :gutter="24">
            <a-col :span="12">
              <a-form-item label="企业名称" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.enterpriseName||'暂无'}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item
                label="统一社会信用代码"
                :labelCol="{span:8}"
                :wrapperCol="{span:16}"
                hasFeedback
              >
                <p>{{recodes.orgCode||'暂无'}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="企业联系人" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.contactCustomerName||'暂无'}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="手机号" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.contactMobilePhoneView||'暂无'}}</p>
              </a-form-item>
            </a-col>
          </a-row>
        </a-card>
        <a-card title="融资主体信息" v-if="typeFlag==3" :bordered="false">
          <a-row :gutter="24">
            <a-col :span="12">
              <a-form-item label="客户名称" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.customerName||'暂无'}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="身份证号码" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.idCardNo||'暂无'}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="手机号码" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.mobilePhoneView||'暂无'}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="企业名称" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.enterpriseName||'暂无'}}</p>
              </a-form-item>
            </a-col>
          </a-row>
        </a-card>
        <a-card title="融资申请信息" :bordered="false">
          <a-row :gutter="24">
            <a-col :span="12">
              <a-form-item label="借款订单号" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.orderNo||'暂无'}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="融资金额(元)" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{ this.$numMoney(recodes.financingMoney)||'暂无'}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="融资状态" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{changeType(recodes.financingState,'financingState')}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="产品分类编号" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.productCategoryNo||'暂无'}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="申请产品名称" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.productName}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="产品类型" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.typeMsg}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="账单期限" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.term+recodes.termTypeMsg}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="还款方式" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.repaymentTypeMsg}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="还款日" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.repaymentDay}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="产品利率(%)" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.interestRate}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item
                label="产品逾期利率(%)"
                :labelCol="{span:8}"
                :wrapperCol="{span:16}"
                hasFeedback
              >
                <p>{{recodes.penaltyRate}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="资金方编号" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.fundNo}}</p>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="资金方名称" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <p>{{recodes.fundName}}</p>
              </a-form-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">确定</a-button>
          </a-row>-->
        </a-card>
        <a-card title="业务渠道信息" :bordered="false">
          <a-row :gutter="24">
            <a-col :span="12">
              <a-form-item label="业务机构" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <!-- <p>{{changeType1(recodes.businessDepartmentNo,'programOffices')}}</p> -->
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="业务线名称" :labelCol="{span:8}" :wrapperCol="{span:16}" hasFeedback>
                <!-- <p>{{changeType1(recodes.businessChannelNo,'dbBusinessChannel')}}</p> -->
              </a-form-item>
            </a-col>
          </a-row>
        </a-card>
      </a-form>
    </a-spin>
  </a-modal>
</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 { financingState } from '@/data/params'
import { JeecgListMixin } from '@/mixins/CoreListMixin'
import { modifyCollPersonalApply, queryCollPersonalApplyDetail, postAction } from '@/api/configApi'

export default {
  name: 'fundSideProductsModal',
  mixins: [JeecgListMixin],
  components: {},
  data() {
    return {
      visible: false,
      confirmLoading: false,
      title: '',
      typeFlag: '', //默认为个人
      disableSubmit: false,
      onlyread: false,
      id: '',
      programOffices: JSON.parse(sessionStorage.getItem('PROGRAMOFFICES')), // 组织机构
      dbBusinessChannel: JSON.parse(sessionStorage.getItem('DB_BUSINESS_CHANNEL')), // 业务线名称
      dbCooPerationPlatform: JSON.parse(sessionStorage.getItem('DB_COOPERATION_PLATFORM')), // 合作平台
      dbProductCategory: JSON.parse(sessionStorage.getItem('DB_PRODUCT_CATEGORY')), // 产品分类
      financingState: financingState,
      repaymentTypeMsg: [
        { label: '到期还本付息 ', value: '1' },
        { label: '等额本息 ', value: '2' },
        { label: '先息后本 ', value: '3' }
      ],
      defaultTabKey: '',
      validatorRules: {
        idCard: {
          rules: [
            {
              required: true,
              pattern: /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/,
              message: '请输入身份证号'
            }
          ]
        },
        idCardPictureFront: {
          rules: [
            {
              required: true,
              message: '请上传身份证正面'
            }
          ]
        },
        idCardPictureBack: {
          rules: [
            {
              required: true,
              message: '请上传身份证反面'
            }
          ]
        },
        params1: {
          rules: [
            {
              required: true,
              message: '请输入费用编号'
            }
          ]
        },
        password: {
          rules: [
            {
              required: true,
              pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
              message: '密码由8位数字、大小写字母和特殊符号组成!'
            },
            {
              validator: this.validateToNextPassword
            }
          ]
        },
        confirmpassword: {
          rules: [
            {
              required: true,
              message: '请重新输入登陆密码!'
            },
            {
              validator: this.compareToFirstPassword
            }
          ]
        }
      },
      creditList: '',
      model: {},
      recodes: {}, // 进件信息

      form: this.$form.createForm(this),
      dateFormat: 'YYYY-MM-DD',
      disableMixinCreated: true,
      url: {
        imgerver: window._CONFIG['domianURL'] + '/sys/common/view',
        syncUser: '/process/extActProcess/doSyncUser',
        // list: '/recodes/queryCollPersonalApplyList',
        delete: '/sys/user/delete',
        deleteBatch: '/sys/user/deleteBatch',
        exportXlsUrl: '/sys/user/exportXls',
        upload: window._CONFIG['uploadUrl']
      }
    }
  },
  created() {
    console.log('created')
  },
  methods: {
    moment,
    changeType(t, type) {
      for (var i = 0; i < this[type].length; i++) {
        if (t == this[type][i].value) {
          return this[type][i].label
        }
      }
      // console.log(t)
      return '暂无'
    },
    changeType1(t, type) {
      for (var i = 0; i < this[type].length; i++) {
        if (t == this[type][i].name) {
          return this[type][i].title
        }
      }
      // console.log(t)
      return '暂无'
    },
    edit(res, type) {
      console.log(res)
      this.recodes = res
      this.typeFlag = type //company企业和法人,personal个人
      this.form.resetFields()
      this.visible = true
      this.$nextTick(() => {
        this.form.setFieldsValue(res)
      })
    },
    add() {
      this.model = {}
      this.form.resetFields()
      this.visible = true
      this.$nextTick(() => {})
    },

    close() {
      this.$emit('close')
      this.visible = false
      this.disableSubmit = false
      this.selectedRole = []
    },
    handleSubmit() {
      // 触发表单验证
      this.$emit('ok')
    },
    handleCancel() {
      this.close()
    },
    // tabs 回调
    callback() {}
  }
}
</script>
<style>
.scoped-person .ant-modal-body {
  padding: 0 24px !important;
}
.scoped-person .ant-modal-body {
  overflow-y: scroll;
  min-height: 600px;
  max-height: 600px !important;
}
.scoped-person .ant-tabs-bar {
  margin-bottom: 0;
}
.scoped-person .ant-card-body {
  padding: 10px 24px;
}
.scoped-person .ant-layout-sider {
  flex: 0 0 300px;
  max-width: 300px !important;
  min-width: 300px !important;
  width: 300px !important;
}
.scoped-person .ant-modal-footer {
  display: none;
}
.scoped-person .scoped-img img {
  width: 200px;
}
</style>