humanInformation.vue 17.4 KB
<template>
    <a-spin :spinning="confirmLoading">
        <a-form :form="form">
            <a-card title="人行征信报告信息" :bordered="false">
                <a-row :gutter="24">
                    <a-col :span="12">
                        <a-form-item label="报告主体" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
                            <a-select mode="multiple"
                                v-decorator="['reportSubject', { initialValue: renhang ? renhang.reportSubject : '' }]"
                                placeholder="请选择">
                                <a-select-option :value="'0'">借款人(个人)</a-select-option>
                                <a-select-option :value="'1'">借款人(企业)</a-select-option>
                                <a-select-option :value="'2'">借款人(个人)配偶</a-select-option>
                                <a-select-option :value="'3'">借款人(企业)实控人/法定代表人</a-select-option>
                            </a-select>
                        </a-form-item>
                    </a-col>
                    <a-col :span="12">
                        <a-form-item label="征信报告打印日" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
                            <a-date-picker show-time placeholder="请输入调查时间" :dateFormat="dateFormat"
                                v-decorator="['printDate', { initialValue: renhang ? renhang.printDate : '' }]" />
                        </a-form-item>
                    </a-col>
                </a-row>
                <a-row :gutter="24">
                    <a-col :span="12">
                        <a-form-item label="是否存在五级分类以外状态" :labelCol="{ span: 10 }" :wrapperCol="{ span: 14 }">
                            <a-radio-group
                                v-decorator="['statusFive', { initialValue: renhang ? renhang.statusFive : '' }]">
                                <a-radio :value="0">是</a-radio>
                                <a-radio :value="1">否</a-radio>
                            </a-radio-group>
                        </a-form-item>
                    </a-col>
                    <a-col :span="12">
                        <a-form-item label="当前是否有逾期" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
                            <a-radio-group
                                v-decorator="['beOverDue', { initialValue: renhang ? renhang.beOverDue : '' }]">
                                <a-radio :value="0">是</a-radio>
                                <a-radio :value="1">否</a-radio>
                            </a-radio-group>
                        </a-form-item>
                    </a-col>
                </a-row>
                <a-row :gutter="24">
                    <a-col :span="12">
                        <a-form-item label="是否有呆账" :labelCol="{ span: 4 }" :wrapperCol="{ span: 16 }">
                            <a-radio-group
                                v-decorator="['badDebts', { initialValue: renhang ? renhang.badDebts : '' }]">
                                <a-radio :value="0">是</a-radio>
                                <a-radio :value="1">否</a-radio>
                            </a-radio-group>
                            注:贷记卡或贷款状态为呆账/冻结/止付/担保人代偿等
                        </a-form-item>
                    </a-col>
                </a-row>
                <a-row :gutter="24">
                    <a-col :span="12">
                        <a-form-item label="贷款逾期次数(近6个月)" :labelCol="{ span: 12 }" :wrapperCol="{ span: 12 }">
                            <a-input placeholder="请输入贷款逾期次数(近6个月)"
                                v-decorator="['loanSix', { initialValue: renhang ? renhang.loanSix : '' }]" />
                        </a-form-item>
                    </a-col>
                    <a-col :span="12">
                        <a-form-item label="贷款逾期次数(近12个月)" :labelCol="{ span: 12 }" :wrapperCol="{ span: 12 }">
                            <a-input placeholder="请输入贷款逾期次数(近12个月)"
                                v-decorator="['loanTwelve', { initialValue: renhang ? renhang.loanTwelve : '' }]" />
                        </a-form-item>
                    </a-col>
                </a-row>
                <a-row :gutter="24">
                    <a-col :span="12">
                        <a-form-item label="贷款逾期次数(近24个月)" :labelCol="{ span: 12 }" :wrapperCol="{ span: 12 }">
                            <a-input placeholder="请输入贷款逾期次数(近24个月)"
                                v-decorator="['loanTwentyFour', { initialValue: renhang ? renhang.loanTwentyFour : '' }]" />
                        </a-form-item>
                    </a-col>
                </a-row>
                <a-row :gutter="24">
                    <a-col :span="12">
                        <a-form-item label="累计逾期次数(近6个月)" :labelCol="{ span: 12 }" :wrapperCol="{ span: 12 }">
                            <a-input placeholder="请输入累计逾期次数(近6个月)"
                                v-decorator="['beOverdueSix', { initialValue: renhang ? renhang.beOverdueSix : '' }]" />
                        </a-form-item>
                    </a-col>
                    <a-col :span="12">
                        <a-form-item label="累计逾期次数(近12个月)" :labelCol="{ span: 12 }" :wrapperCol="{ span: 12 }">
                            <a-input placeholder="请输入累计逾期次数(近12个月)"
                                v-decorator="['beOverdueTwelve', { initialValue: renhang ? renhang.beOverdueTwelve : '' }]" />
                        </a-form-item>
                    </a-col>
                </a-row>
                <a-row :gutter="24">
                    <a-col :span="12">
                        <a-form-item label="累计逾期次数(近24个月)" :labelCol="{ span: 12 }" :wrapperCol="{ span: 12 }">
                            <a-input placeholder="请输入累计逾期次数(近24个月)"
                                v-decorator="['beOverdueTwentyFour', { initialValue: renhang ? renhang.beOverdueTwentyFour : '' }]" />
                        </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 }">
                            <a-radio-group
                                v-decorator="['beOverdueThree', { initialValue: renhang ? renhang.beOverdueThree : '' }]">
                                <a-radio :value="0">是</a-radio>
                                <a-radio :value="1">否</a-radio>
                            </a-radio-group>
                        </a-form-item>
                    </a-col>
                </a-row>
                <a-row :gutter="24">
                    <a-col :span="12">
                        <a-form-item label="近12个月最大逾期期数(期)" :labelCol="{ span: 12 }" :wrapperCol="{ span: 12 }">
                            <a-input placeholder="请输入近12个月最大逾期期数(期)"
                                v-decorator="['maxOverdueTwelve', { initialValue: renhang ? renhang.maxOverdueTwelve : '' }]" />
                        </a-form-item>
                    </a-col>
                    <a-col :span="12">
                        <a-form-item label="近12个月最大逾期期数的次数(次)" :labelCol="{ span: 12 }" :wrapperCol="{ span: 12 }">
                            <a-input placeholder="请输入近12个月最大逾期期数的次数(次)"
                                v-decorator="['maxNumberTwelve', { initialValue: renhang ? renhang.maxNumberTwelve : '' }]" />
                        </a-form-item>
                    </a-col>
                    <a-col :span="12">
                        <a-form-item label="近24个月最大逾期期数(期)" :labelCol="{ span: 12 }" :wrapperCol="{ span: 12 }">
                            <a-input placeholder="请输入近24个月最大逾期期数(期)"
                                v-decorator="['maxOverdueTwentyFour', { initialValue: renhang ? renhang.maxOverdueTwentyFour : '' }]" />
                        </a-form-item>
                    </a-col>
                    <a-col :span="12">
                        <a-form-item label="近24个月最大逾期期数的次数(次)" :labelCol="{ span: 12 }" :wrapperCol="{ span: 12 }">
                            <a-input placeholder="请输入近24个月最大逾期期数的次数(次)"
                                v-decorator="['maxNumberTwentyFour', { initialValue: renhang ? renhang.maxNumberTwentyFour : '' }]" />
                        </a-form-item>
                    </a-col>
                    <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-row>
            </a-card>
        </a-form>
        <a-form :form="form2">
            <a-card title="其它补充信息" :bordered="false">
                <a-row :gutter="24">
                    <a-col :span="12">
                        <a-form-item label="补充信息" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
                            <a-textarea
                                v-decorator="['supplementInfo', { initialValue: renhang ? renhang.supplementInfo : '' }]" />
                        </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="handleSubmit2">确定</a-button>
                </a-row>
            </a-card>
        </a-form>
    </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 { updateCreditInfo, updateSupplementInfo } from '@/api/configApi'
export default {
    name: 'PersonalInformationListModal',
    mixins: [JeecgListMixin],
    components: {
    },
    props: {
        renhang: {
            type: Object,
            // default: () => {
            //   return [];
            // }
        },
        applyNo: {
            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,
            applyNo: '',
            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),
            dateFormat: 'YYYY-MM-DD',
            disableMixinCreated: true,
            url: {
                upload: window._CONFIG['uploadUrl']
            },
            headers: {
                'X-Access-Token': this.$store.state.user.token,
            }
        }
    },
    computed: {

    },
    methods: {
        moment,
        edit(res, applyNo) {
            this.defaultTabKey = '1'
            console.log("ssss", res)
            // console.log("hhh",res.cusBankAccountResponses)
            this.assignment(res)
            this.applyNo = applyNo
            this.id = res.cusBankAccountResponses.id
            this.form.resetFields()
            // this.form2.resetFields()
            this.visible = true
            this.$nextTick(() => { })
        },
        resetFields() {
            this.form.resetFields()
            this.form2.resetFields()
        },
        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.form.validateFields((err, values) => {
                if (!err) {
                    this.confirmLoading = true
                    console.log(values)
                    let applyNo = { applyNo: localStorage.getItem("dh") }
                    let formData = Object.assign(applyNo, values)
                    let a = values.printDate
                    // formData.printDate = a.format("YYYY-MM-DD hh:mm:ss")
                    // console.log(a)
                    updateCreditInfo(formData)
                        .then(res => {
                            if (res.status.statusCode == 0) {

                                this.$message.success(res.status.statusReason)
                                this.$emit('editReload')
                            } else {
                                this.$message.warning(res.status.statusReason)
                            }
                        })
                        .finally(() => {
                            this.confirmLoading = false
                            this.close()
                        })
                }
            })
        },
        handleSubmit2() {
            // 触发表单验证
            this.form2.validateFields((err, values) => {
                if (!err) {
                    this.confirmLoading = true
                    console.log(values)
                    let applyNo = { applyNo: localStorage.getItem("dh") }
                    let formData = Object.assign(applyNo, values)
                    // console.log(a)
                    updateSupplementInfo(formData)
                        .then(res => {
                            if (res.status.statusCode == 0) {

                                this.$message.success(res.status.statusReason)
                                this.$emit('editReload')
                            } else {
                                this.$message.warning(res.status.statusReason)
                            }
                        })
                        .finally(() => {
                            this.confirmLoading = false
                            this.close()
                        })
                }
            })
        },
        handleCancel() {
            this.$emit("handleCancel")
        },
        // tabs 回调
        callback(key) {
            if (key == 7) {
                this.$refs.approval.loadData()
            }
        },
        editReload() {
            let _p = { applyNo: this.applyNo }
            queryCollPersonalApplyDetail(_p).then(res => {
                this.assignment(res.result)
            })
        },
        assignment(res) {
            this.model = res ? res : {}
            this.collPersonalApply = this.model.collPersonalApply
            this.renhang = this.model.cusBasicInfoResponse
            // //console.log("111111", this.renhang)
            // if (this.renhang) {
            //   this.imageUrlFront = this.renhang.idCardUrl
            //   this.imageUrlBack = this.renhang.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>