investigationConclusion.vue 24.9 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
<template>
    <a-spin :spinning="confirmLoading">
        <!-- <a-form-model :form="form"> -->
        <a-card title="客户材料提交情况" :bordered="false">
            <!-- {{jielun}} -->
            <table align="center" border="1" cellspacing="0" cellpadding="1" id="playlistTable"
                v-if="jielun.materialList">
                <tr>
                    <th>序号</th>
                    <th style="width: 300px;">材料名称</th>
                    <th>是否已提交(是/否)</th>
                    <th>合规说明</th>
                </tr>
                <tr v-for="(item, index) in jielun.materialList" :key="index">
                    <td>{{ item.order }}</td>
                    <td>{{ item.materialName }}</td>
                    <td>
                        <select name="" id="" v-model="item.isSubmit" :disabled="onlyread && disableSubmit" @change="upInput">
                            <option value="1">是</option>
                            <option value="0">否</option>
                        </select>
                    </td>
                    <td>
                        <input type="text" :value="item.explain" :readOnly="onlyread && disableSubmit" @change="upInput" />
                    </td>
                </tr>
            </table>
            <table align="center" border="1" cellspacing="0" cellpadding="1" id="playlistTable" v-else>
                <tr>
                    <th>序号</th>
                    <th style="width: 300px;">材料名称</th>
                    <th>是否已提交(是/否)</th>
                    <th>合规说明</th>
                </tr>
                <tr>
                    <td>1</td>
                    <td>借款人身份证</td>
                    <td>
                        <select name="" id="" :disabled="onlyread && disableSubmit"  @change="upInput">
                            <option value="1">是</option>
                            <option value="0">否</option>
                        </select>
                    </td>
                    <td>
                        <input type="text" value="" :readOnly="onlyread && disableSubmit" @change="upInput" />
                    </td>
                </tr>
                <tr>
                    <td>2</td>
                    <td>借款人配偶身份证(如适用)</td>
                    <td>
                        <select name="" id="" :disabled="onlyread && disableSubmit" @change="upInput">
                            <option value="1">是</option>
                            <option value="0">否</option>
                        </select>
                    </td>
                    <td>
                        <input type="text" value="" :readOnly="onlyread && disableSubmit" @change="upInput" />
                    </td>
                </tr>
                <tr>
                    <td>3</td>
                    <td>借款人婚姻证明(如适用)</td>
                    <td>
                        <select name="" id="" :disabled="onlyread && disableSubmit" @change="upInput">
                            <option value="1">是</option>
                            <option value="0">否</option>
                        </select>
                    </td>
                    <td>
                        <input type="text" value="" :readOnly="onlyread && disableSubmit" @change="upInput" />
                    </td>
                </tr>
                <tr>
                    <td>4</td>
                    <td>家庭资产证明材料(房产证、行驶证、有价证券等)</td>
                    <td>
                        <select name="" id="" :disabled="onlyread && disableSubmit" @change="upInput">
                            <option value="1">是</option>
                            <option value="0">否</option>
                        </select>
                    </td>
                    <td>
                        <input type="text" value="" :readOnly="onlyread && disableSubmit" @change="upInput" />
                    </td>
                </tr>
                <tr>
                    <td>5</td>
                    <td>经营企业营业执照(如适用)</td>
                    <td>
                        <select name="" id="" :disabled="onlyread && disableSubmit" @change="upInput">
                            <option value="1">是</option>
                            <option value="0">否</option>
                        </select>
                    </td>
                    <td>
                        <input type="text" value="" :readOnly="onlyread && disableSubmit" @change="upInput" />
                    </td>
                </tr>
                <tr>
                    <td>6</td>
                    <td>经营企业主要结算账户近1年银行流水;如主要账款以个人账户形式结算则须提供个人账户近1年银行流水(含支付宝、微信等收入、支出转账记录)</td>
                    <td>
                        <select name="" id="" :disabled="onlyread && disableSubmit" @change="upInput">
                            <option value="1">是</option>
                            <option value="0">否</option>
                        </select>
                    </td>
                    <td>
                        <input type="text" value="" :readOnly="onlyread && disableSubmit" @change="upInput" />
                    </td>
                </tr>
                <tr>
                    <td>7</td>
                    <td>经营主体与上下游签订的能证明经营情况的合同、约定等相关材料</td>
                    <td>
                        <select name="" id="" :disabled="onlyread && disableSubmit" @change="upInput">
                            <option value="1">是</option>
                            <option value="0">否</option>
                        </select>
                    </td>
                    <td>
                        <input type="text" value="" :readOnly="onlyread && disableSubmit" @change="upInput" />
                    </td>
                </tr>
                <tr>
                    <td>8</td>
                    <td>个人及配偶征信报告</td>
                    <td>
                        <select name="" id="" :disabled="onlyread && disableSubmit" @change="upInput">
                            <option value="1">是</option>
                            <option value="0">否</option>
                        </select>
                    </td>
                    <td>
                        <input type="text" value="" :readOnly="onlyread && disableSubmit" @change="upInput" />
                    </td>
                </tr>
                <tr>
                    <td>9</td>
                    <td>个人及配偶信息查询授权书</td>
                    <td>
                        <select name="" id="" :disabled="onlyread && disableSubmit" @change="upInput">
                            <option value="1">是</option>
                            <option value="0">否</option>
                        </select>
                    </td>
                    <td>
                        <input type="text" value="" :readOnly="onlyread && disableSubmit" @change="upInput" />
                    </td>
                </tr>
            </table>
            <a-row :gutter="24" v-show="!disableSubmit" style="float:right;margin-right:20px;margin-top: 25px;">
                <a-button style="margin-right:10px;" @click="handleCancel">取消</a-button>
                <a-button type="primary" @click="handleSubmit" v-if="upInputList == 1">确定</a-button>
                <a-button type="primary" @click="handleSubmit" v-else :disabled="true">确定</a-button>
            </a-row>
        </a-card>
        <!-- </a-form-model> -->
        <a-form-model ref="form2" :model="jielun" :rules="validatorRules2">
            <a-card title="主办经理调查结论" :bordered="false">
                <a-form-model-item prop="surveyDate" label="调查时间" :labelCol="{ span: 2 }" :wrapperCol="{ span: 16 }">
                    <a-date-picker show-time placeholder="请输入调查时间" format="YYYY-MM-DD"
                        :disabled="onlyread && disableSubmit" v-model="jielun.surveyDate" />
                </a-form-model-item>
                <a-form-model-item prop="surveyOpinion" label="调查意见" :labelCol="{ span: 2 }" :wrapperCol="{ span: 16 }">
                    <a-textarea :readOnly="onlyread && disableSubmit" v-model="jielun.surveyOpinion" />
                </a-form-model-item>
                <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="jielun" :rules="validatorRules3">
            <a-card title="协办经理调查结论" :bordered="false">
                <a-row :gutter="24">
                    <a-col :span="10">
                        <a-form-model-item prop="isAdopt" label="复核是否通过" :labelCol="{ span: 8 }"
                            :wrapperCol="{ span: 16 }">
                            <a-radio-group :disabled="onlyread && disableSubmit" v-model="jielun.isAdopt">
                                <a-radio :value="1">是</a-radio>
                                <a-radio :value="2">否</a-radio>
                            </a-radio-group>
                        </a-form-model-item>
                    </a-col>
                    <!-- <a-col :span="10">
                        <a-form-model-item prop="coSurveyDate" label="调查时间" :labelCol="{ span: 6 }"
                            :wrapperCol="{ span: 18 }">
                            <a-date-picker show-time placeholder="请输入调查时间" :disabled="onlyread && disableSubmit"
                                v-model="jielun.coSurveyDate" />
                        </a-form-model-item>
                    </a-col> -->
                    <a-col :span="4" v-if="jielun.showFlag">
                        <a-button style="margin-right:10px;" :disabled="onlyread && disableSubmit" @click="fuhejieguo">
                            复合结果提交</a-button>
                    </a-col>
                </a-row>
                <a-form-model-item prop="coSurveyOpinion" label="补充信息" :labelCol="{ span: 2 }"
                    :wrapperCol="{ span: 16 }">
                    <a-textarea :readOnly="onlyread && disableSubmit" v-model="jielun.coSurveyOpinion" />
                </a-form-model-item>
                <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-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 {
    updateCustomerManageInfo,
    queryCustomerManageInfoByNO,
    updateCusMaterialInfo,
    updateCoSponsorInfo,
    updateSponsorInfo,
    saveCoSponsorInfo
} from '@/api/configApi'
export default {
    name: 'investigationConclusion',
    mixins: [JeecgListMixin],
    components: {

    },
    props: {
        jielun: {
            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,
            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),
            // tableList: this.jielun.materialList,
            dateFormat: 'YYYY-MM-DD',
            disableMixinCreated: true,
            url: {
                upload: window._CONFIG['uploadUrl']
            },
            headers: {
                'X-Access-Token': this.$store.state.user.token,
            },
            validatorRules2: {
                surveyDate: [
                    { required: true, message: '请输入调查日期!' },
                ],
                surveyOpinion: [
                    { required: true, message: '请输入调查意见!' },
                ],
            },
            validatorRules3: {
                isAdopt: [
                    { required: true, message: '请输选择复核结果!' },
                ],
                coSurveyDate: [
                    { required: true, message: '请输入复核时间!' },
                ],
                // coSurveyOpinion: [
                //     { required: true, message: '请输入调查日期!' },
                // ],
            },
            watchBtn1: true,
            updateCount: 0,
            upInputList:0
        }
    },
    computed: {

    },
    mouted() {
        this.editReload()
    },
    watch: {
        jielun: {
            handler(val) {
                if (val) {
                    this.updateCount++
                    if (this.updateCount > 1) {
                        this.watchBtn1 = false
                        console.log("111",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()
        },
        handleSubmit() {
            // 触发表单验证
            this.form.validateFields((err, values) => {
                if (!err) {
                    // this.confirmLoading = true
                    let applyNo1 = { applyNo: this.applyNo }
                    var JsonData = {
                        applyNo: "",
                        order: "",
                        materialName: "",
                        isSubmit: "",
                        explain: "",
                        customerType: "1"
                    }
                    var aa = [];
                    var rows = document.getElementById("playlistTable").rows.length;
                    var colums = document.getElementById("playlistTable").rows[0].cells.length;
                    for (var i = 1; i < rows; i++) {
                        var JsonData = new Object();
                        JsonData.order = document.getElementById("playlistTable").rows[i].cells[0].innerHTML;
                        JsonData.materialName = document.getElementById("playlistTable").rows[i].cells[1].innerHTML;
                        JsonData.isSubmit = document.getElementById("playlistTable").rows[i].cells[2].children[0].value;
                        JsonData.explain = document.getElementById("playlistTable").rows[i].cells[3].children[0].value;
                        JsonData.applyNo = this.applyNo
                        aa.push(JsonData);
                    }
                    var obj = JSON.stringify(aa);
                    console.log(obj);
                    let formData = Object.assign(aa)
                    // console.log(a)
                    updateCusMaterialInfo(formData)
                        .then(res => {
                            if (res.status.statusCode == 0) {
                                this.$message.success(res.status.statusReason)
                                this.$emit('editReload')
                                this.updateCount = 0
                                this.watchBtn1 = true
                                this.upInputList = 0
                            } else {
                                this.$message.warning(res.status.statusReason)
                            }
                        })
                        .finally(() => {
                            this.confirmLoading = false
                            this.close()
                            this.updateCount = 0
                            this.watchBtn1 = true
                            this.upInputList = 0
                        })
                }
            })
        },
        handleSubmit2() {
            // 触发表单验证
            this.$refs.form2.validate(valid => {
                if (valid) {
                    this.confirmLoading = true
                    let applyNo = {
                        applyNo: this.applyNo,
                        customerType: '1'
                    }
                    let formData = Object.assign(applyNo, this.jielun)
                    // console.log(a)
                    updateSponsorInfo(formData)
                        .then(res => {
                            if (res.status.statusCode == 0) {
                                this.$message.success(res.status.statusReason)
                                this.$emit('editReload')
                                this.updateCount = 0
                                this.watchBtn1 = true
                                this.upInputList = 0
                            } else {
                                this.$message.warning(res.status.statusReason)
                            }
                        })
                        .finally(() => {
                            this.confirmLoading = false
                            this.close()
                            this.updateCount = 0
                            this.watchBtn1 = true
                            this.upInputList = 0
                        })
                }
            })
        },
        handleSubmit3() {
            // 触发表单验证
            this.$refs.form3.validate(valid => {
                if (valid) {
                    this.confirmLoading = true
                    let applyNo = { applyNo: this.applyNo, loginId: localStorage.getItem("userId") }
                    let customerType = { customerType: "1" }
                    let formData = Object.assign(applyNo, this.jielun, customerType)
                    // console.log(a)
                    updateCoSponsorInfo(formData)
                        .then(res => {
                            if (res.status.statusCode == 0) {
                                this.$message.success(res.status.statusReason)
                                this.$emit('editReload')
                                this.updateCount = 0
                                this.upInputList = 0
                                this.watchBtn1 = true
                            } else {
                                this.$message.warning(res.status.statusReason)
                            }
                        })
                        .finally(() => {
                            this.confirmLoading = false
                            this.close()
                            this.updateCount = 0
                            this.watchBtn1 = true
                            this.upInputList = 0
                        })
                }
            })
        },
        handleCancel() {
            this.$emit("handleCancel")
        },
        // tabs 回调
        callback(key) {
            if (key == 7) {
                this.$refs.approval.loadData()
            }
        },
        fuhejieguo() {
            this.$refs.form3.validate(valid => {
                if (valid) {
                    this.confirmLoading = true
                    let applyNo = { applyNo: this.applyNo }
                    let customerType = { customerType: "1" }
                    // let t = values.surveyDate
                    let formData = Object.assign(applyNo, this.jielun, customerType)
                    // formData.surveyDate = t.format("YYYY-MM-DD hh:mm:ss")
                    // console.log(a)
                    saveCoSponsorInfo(formData)
                        .then(res => {
                            if (res.status.statusCode == 0) {
                                this.$message.success(res.status.statusReason)
                                this.$emit('editReload')
                                this.updateCount = 0
                                this.watchBtn1 = true
                                this.upInputList = 0
                            } else {
                                this.$message.warning(res.status.statusReason)
                            }
                        })
                        .finally(() => {
                            this.confirmLoading = false
                            this.close()
                            this.updateCount = 0
                            this.watchBtn1 = true
                            this.upInputList = 0
                        })
                }
            })
        },
        editReload() {
            let _p = { applyNo: this.applyNo }
            queryCustomerManageInfoByNO(_p).then(res => {
                this.assignment(res.result)
            })
        },
        upInput(value){
            this.upInputList = 1
        },
        assignment(res) {
            this.model = res ? res : {}
            this.jielun = this.model.cusBasicInfoResponse
            // //console.log("111111", this.jielun)
            // if (this.jielun) {
            //   this.imageUrlFront = this.jielun.idCardUrl
            //   this.imageUrlBack = this.jielun.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;
}

th,
td {
    padding: 4px 8px 4px 8px;

}

td input {
    border: 0;
}

tr td:nth-child(1) {
    width: 50px;
}

tr td:nth-child(1) input {
    width: 30px;
    text-align: center;
}

th,
td {
    padding: 4px 8px 4px 8px;

}

th {
    text-align: center;
}

td input {
    border: 0;
    width: 100%;
}

td select {
    width: 100%;
    text-align: center;
    background-color: #fff;
}

td textarea {
    border: 0px;
    resize: none;
    width: 100%;
}

tr td:nth-child(1) {
    width: 50px;
}

tr td:nth-child(1) {
    width: 50px;
    text-align: center;
}

tr td:nth-child(3) input {
    border-bottom: 1px solid #ccc;
    text-align: center;
}
</style>