<template>
|
<div class="product">
|
<div v-for="(item,index) in loanArr" :key="index">
|
<el-form
|
:model="loanForm[index]"
|
:rules="rules"
|
ref="loanForm"
|
label-width="165px"
|
inline
|
size="small"
|
>
|
<div class="_block" v-if="loanArr[index].certId.visible">
|
<p class="title">
|
<span></span>
|
借款人信息
|
</p>
|
<div class="form">
|
<el-form-item label="客户编号">
|
<el-input v-model="loanForm[index].customerid" disabled></el-input>
|
</el-form-item>
|
<el-form-item label="客户名称">
|
<el-input v-model="loanForm[index].customername" disabled></el-input>
|
</el-form-item>
|
<el-form-item label="证件类型">
|
<el-input v-model="loanArr[index].certType.valueDesc" disabled></el-input>
|
</el-form-item>
|
<el-form-item label="证件号码">
|
<el-input v-model="loanForm[index].certId" disabled></el-input>
|
</el-form-item>
|
</div>
|
</div>
|
<div class="_block">
|
<header>
|
<p>
|
<span></span>
|
基本信息
|
</p>
|
<p>
|
<el-button plain v-if="loanArr[index].onlyCreditSerialno.visible" @click="handleCredit">查看授信详情</el-button>
|
<el-button plain v-if="applyInfo.phaseNo=='0100'" @click="handleQRCode">客户信息认证</el-button>
|
<el-button plain v-if="applyInfo.phaseNo=='0100'" @click="handleAuthStatus">客户认证结果</el-button>
|
</p>
|
</header>
|
<div class="form">
|
<el-form-item label="申请编号">
|
<el-input v-model="loanForm[index].serialno" disabled></el-input>
|
</el-form-item>
|
<el-form-item label="合同编号" v-if="loanArr[index].contractartificialno.visible">
|
<el-input v-model="loanForm[index].contractartificialno" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="贷款申请金额"
|
v-if="loanArr[index].hopebusinesssum.visible"
|
prop="hopebusinesssum"
|
>
|
<el-input
|
v-model="loanForm[index].hopebusinesssum"
|
@blur="loanForm[index].hopebusinesssum = formatMoney(loanForm[index].hopebusinesssum)"
|
:disabled="!loanArr[index].hopebusinesssum.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="贷款申请期限(月)"
|
v-if="loanArr[index].hopebusinesstermmonth.visible"
|
prop="hopebusinesstermmonth"
|
>
|
<el-select
|
v-model="loanForm[index].hopebusinesstermmonth"
|
:disabled="!loanArr[index].hopebusinesstermmonth.writeAble"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
>
|
<el-option
|
v-for="(item,index) in hopeLoanTermList"
|
:key="index"
|
:label="item.creditTerm"
|
:value="item.creditTerm"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item
|
label="期望贷款期限(天)"
|
v-if="loanArr[index].hopebusinesstermday.visible"
|
prop="hopebusinesstermday"
|
>
|
<el-input
|
v-model="loanForm[index].hopebusinesstermday"
|
:disabled="!loanArr[index].hopebusinesstermday.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="产品名称" v-if="loanArr[index].productid.visible" prop="productid">
|
<el-input v-model="loanForm[index].productname" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="产品维度名称"
|
v-if="loanArr[index].productdimension.visible"
|
prop="productdimension"
|
>
|
<el-input v-show="false" v-model="loanForm[index].productdimension"></el-input>
|
<el-input v-model="loanForm[index].productdimensionname" disabled></el-input>
|
</el-form-item>
|
<el-form-item label="业务类型" v-if="loanArr[index].occurtype.visible" prop="occurtype">
|
<el-select
|
v-model="loanForm[index].occurtype"
|
:disabled="!loanArr[index].occurtype.writeAble"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
>
|
<el-option
|
v-for="(item,index) in businessTypeList"
|
:key="index"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item
|
label="进件渠道"
|
v-if="loanArr[index].applychannelDesc.visible"
|
prop="applychannelDesc"
|
>
|
<el-input v-model="loanForm[index].applychannel" v-show="false"></el-input>
|
<el-input v-model="loanForm[index].applychannelDesc" disabled></el-input>
|
</el-form-item>
|
<el-form-item label="面签渠道" v-if="loanArr[index].signcontractchannel.visible">
|
<el-select
|
v-model="loanForm[index].signcontractchannel"
|
:disabled="!loanArr[index].signcontractchannel.writeAble"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
>
|
<el-option
|
v-for="(item,index) in signContractChannel"
|
:key="index"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item
|
label="产品客群名称"
|
v-if="loanArr[index].productcustomerscode.visible"
|
prop="productcustomerscode"
|
>
|
<el-select
|
v-model="loanForm[index].productcustomerscode"
|
:disabled="!loanArr[index].productcustomerscode.writeAble"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
@change="getCustomerbasename"
|
>
|
<el-option
|
v-for="(item,index) in customerBaseList"
|
:key="index"
|
:label="item.customersName"
|
:value="item.customersCode"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="业务城市" v-if="loanArr[index].businesscity.visible" prop="businesscity">
|
<el-select
|
v-model="loanForm[index].businesscity"
|
:disabled="!loanArr[index].businesscity.writeAble"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
>
|
<el-option
|
v-for="(item,index) in allCityList"
|
:key="index"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="面签城市" v-if="loanArr[index].signedcity.visible" prop="signedcity">
|
<el-select
|
v-model="loanForm[index].signedcity"
|
:disabled="!loanArr[index].signedcity.writeAble"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
>
|
<el-option
|
v-for="(item,index) in allCityList"
|
:key="index"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item
|
label="渠道限额城市"
|
v-if="loanArr[index].channelquotacity.visible"
|
prop="channelquotacity"
|
>
|
<el-select
|
v-model="loanForm[index].channelquotacity"
|
:disabled="!loanArr[index].channelquotacity.writeAble"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
>
|
<el-option
|
v-for="(item,index) in allCityList"
|
:key="index"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item :label="loanForm[index].mergeCreditLoan=='0'&&loanForm[index].occurtype=='01'?'授信申请金额':'贷款金额'" v-if="loanArr[index].businesssum.visible" prop="businesssum">
|
<el-input
|
v-model="loanForm[index].businesssum"
|
:disabled="!loanArr[index].businesssum.writeAble"
|
@blur="loanForm[index].businesssum = formatMoney(loanForm[index].businesssum)"
|
@change="qryTrial(loanForm[index])"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="贷款期限(月)"
|
v-if="loanArr[index].businesstermmonth.visible"
|
prop="businesstermmonth"
|
>
|
<el-select
|
v-model="loanForm[index].businesstermmonth"
|
:disabled="!loanArr[index].businesstermmonth.writeAble"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
@change="qryRepaymenttype"
|
>
|
<el-option
|
v-for="(item,index) in loanTermList"
|
:key="index"
|
:label="item.creditTerm"
|
:value="item.creditTerm"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item
|
label="贷款期限(天)"
|
v-if="loanArr[index].businesstermday.visible"
|
prop="businesstermday"
|
>
|
<el-input
|
v-model="loanForm[index].businesstermday"
|
:disabled="!loanArr[index].businesstermday.writeAble"
|
@blur="qryTrial(loanForm[index])"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="还款方式"
|
v-if="loanArr[index].repaymenttype.visible"
|
prop="repaymenttype"
|
>
|
<el-select
|
v-model="loanForm[index].repaymenttype"
|
:disabled="!loanArr[index].repaymenttype.writeAble"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
@change="qryHopebusinesstermmonth"
|
>
|
<el-option
|
v-for="(item,index) in repayTypeList"
|
:key="index"
|
:label="item.paymentName"
|
:value="item.paymentType"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="借款用途" v-if="loanArr[index].purposetype.visible" prop="purposetype">
|
<el-select
|
v-model="loanForm[index].purposetype"
|
:disabled="!loanArr[index].purposetype.writeAble"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
@change="selpurposetype"
|
>
|
<el-option
|
v-for="(item,index) in loanPurposeList"
|
:key="index"
|
:label="item.purposeDescription"
|
:value="item.purposeType"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="放款金额" v-if="loanArr[index].amountloan.visible" prop="amountloan">
|
<el-input
|
v-model="loanForm[index].amountloan"
|
:disabled="!loanArr[index].amountloan.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
class="remark"
|
label="备注"
|
v-if="loanArr[index].remark.visible"
|
prop="remark"
|
>
|
<el-input
|
type="textarea"
|
maxlength="100"
|
:autosize="{ minRows: 2, maxRows: 2}"
|
v-model="loanForm[index].remark"
|
:disabled="!loanArr[index].remark.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="征信查询机构" v-if="loanArr[index].creditorgid.visible" prop="creditorgid">
|
<el-select
|
v-model="loanForm[index].creditorgid"
|
:disabled="!loanArr[index].creditorgid.writeAble"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
@change="selCreditorg"
|
>
|
<el-option
|
v-for="item in zxLoanOrgList"
|
:key="item.orgcode"
|
:label="item.orgname"
|
:value="item.orgcode"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="放款资金单元" v-if="loanArr[index].fundunitno.visible" prop="fundunitno">
|
<el-select
|
v-model="loanForm[index].fundunitno"
|
:disabled="!loanArr[index].fundunitno.writeAble"
|
@change="selfundunitno"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
>
|
<el-option
|
v-for="item in fundUnitList"
|
:key="item.fundunitno"
|
:label="item.fundunitname"
|
:value="item.fundunitno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item
|
label="贷款机构清单"
|
v-if="loanArr[index].loanOrgList.visible"
|
prop="loanOrgList"
|
>
|
<el-input v-model="loanForm[index].loanOrgList" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="合作商户/厂家名称"
|
v-if="loanArr[index].enterprisecode.visible"
|
prop="enterprisecode"
|
:rules="applyInfo.productID == 'ME'?rules.enterprisecode:[{ required: false }]"
|
>
|
<el-select
|
v-model="loanForm[index].enterprisecode"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
:disabled="!loanArr[index].enterprisecode.writeAble"
|
@change="selEnterprisecode"
|
>
|
<el-option
|
v-for="(item,index) in validCoopers"
|
:key="index"
|
:label="item.channelname"
|
:value="item.serialno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="合作商户/厂家剩余额度" v-if="loanArr[index].enterpriseusablesum.visible">
|
<el-input v-model="loanForm[index].enterpriseusablesum" disabled></el-input>
|
</el-form-item>
|
<el-form-item label="渠道剩余额度" v-if="loanArr[index].surplusamt.visible" prop="surplusamt">
|
<el-input v-model="loanForm[index].surplusamt" disabled></el-input>
|
</el-form-item>
|
<el-form-item label="项目剩余额度" v-if="loanArr[index].projectSum.visible" prop="projectSum">
|
<el-input v-model="loanForm[index].projectSum" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="资金单元剩余可用额度"
|
v-if="loanArr[index].fundunitremanentamt.visible"
|
prop="fundunitremanentamt"
|
>
|
<el-input v-model="loanForm[index].fundunitremanentamt" disabled></el-input>
|
</el-form-item>
|
<el-form-item label="工作单位剩余额度" v-if="loanArr[index].entlimitamount.visible" prop="entlimitamount">
|
<el-input v-model="loanForm[index].entlimitamount" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="基础授信额度"
|
v-if="loanArr[index].basecreditamt.visible"
|
prop="basecreditamt"
|
>
|
<el-input
|
v-model="loanForm[index].basecreditamt"
|
:disabled="!loanArr[index].basecreditamt.writeAble"
|
@blur="qryTrial(loanForm[index])"
|
>
|
</el-input>
|
</el-form-item>
|
<el-form-item
|
label="产品授信额度"
|
v-if="loanArr[index].productcreditamtlimit.visible"
|
prop="productcreditamtlimit"
|
>
|
<el-input
|
v-model="loanForm[index].productcreditamtlimit"
|
:disabled="!loanArr[index].productcreditamtlimit.writeAble"
|
@blur="qryTrial(loanForm[index])"
|
>
|
</el-input>
|
</el-form-item>
|
<el-form-item
|
label="产品剩余可用额度"
|
v-if="loanArr[index].productremanentamt.visible"
|
prop="productremanentamt"
|
>
|
<el-input v-model="loanForm[index].productremanentamt" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="产品额度生效日期"
|
v-if="loanArr[index].productQuotaValidDate.visible"
|
prop="productQuotaValidDate"
|
>
|
<el-input v-model="loanForm[index].productQuotaValidDate" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="产品额度失效日期"
|
v-if="loanArr[index].productQuotaInvalidDate.visible"
|
prop="productQuotaInvalidDate"
|
>
|
<el-input v-model="loanForm[index].productQuotaInvalidDate" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="风控基础授信额度"
|
v-if="loanArr[index].riskbasecreditamt.visible"
|
prop="riskbasecreditamt"
|
>
|
<el-input v-model="loanForm[index].riskbasecreditamt" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="风控产品授信额度"
|
v-if="loanArr[index].riskproductcreditamt.visible"
|
prop="riskproductcreditamt"
|
>
|
<el-input v-model="loanForm[index].riskproductcreditamt" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="白名单执行基础额度"
|
v-if="loanArr[index].whiteexecbaseamt.visible"
|
prop="whiteexecbaseamt"
|
>
|
<el-input v-model="loanForm[index].whiteexecbaseamt" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="白名单执行产品额度"
|
v-if="loanArr[index].whiteexecproductamt.visible"
|
prop="whiteexecproductamt"
|
>
|
<el-input v-model="loanForm[index].whiteexecproductamt" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="白名单建议基础额度"
|
v-if="loanArr[index].whiteadvisebaseamt.visible"
|
prop="whiteadvisebaseamt"
|
>
|
<el-input v-model="loanForm[index].whiteadvisebaseamt" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="白名单建议产品额度"
|
v-if="loanArr[index].whiteadviseproductamt.visible"
|
prop="whiteadviseproductamt"
|
>
|
<el-input v-model="loanForm[index].whiteadviseproductamt" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="白名单执行额度生效日期"
|
v-if="loanArr[index].whiteQuotaValidDate.visible"
|
prop="whiteQuotaValidDate"
|
>
|
<el-input v-model="loanForm[index].whiteQuotaValidDate" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="白名单执行额度失效日期"
|
v-if="loanArr[index].whiteQuotaInvalidDate.visible"
|
prop="whiteQuotaInvalidDate"
|
>
|
<el-input v-model="loanForm[index].whiteQuotaInvalidDate" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="推荐人手机号"
|
v-if="loanArr[index].refereephone.visible"
|
prop="refereephone"
|
>
|
<el-input
|
v-model="loanForm[index].refereephone"
|
@change="getRefereerInfo('refereePhone','0')"
|
:disabled="!loanArr[index].refereephone.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="推荐人编号" v-if="loanArr[index].refereeid.visible" prop="refereeid">
|
<el-input
|
v-model="loanForm[index].refereeid"
|
@change="getRefereerInfo('refereeId','1')"
|
:disabled="!loanArr[index].refereeid.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="推荐人名称" v-if="loanArr[index].refereename.visible" prop="refereename">
|
<el-input v-model="loanForm[index].refereename" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="推荐人直属机构"
|
v-if="loanArr[index].refereeorgname.visible"
|
prop="refereeorgname"
|
>
|
<el-input v-model="loanForm[index].refereeorgname" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="推荐人所属一级内部机构"
|
v-if="loanArr[index].refereefirstinternallevel.visible"
|
prop="refereefirstinternallevel"
|
>
|
<el-input v-model="loanForm[index].refereefirstinternallevelName" disabled></el-input>
|
<el-input v-model="loanForm[index].refereefirstinternallevel" v-show="false"></el-input>
|
</el-form-item>
|
<el-form-item
|
label="报单人编号"
|
v-if="loanArr[index].operateuserid.visible"
|
prop="operateuserid"
|
>
|
<el-input v-model="loanForm[index].operateuserid" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="报单人名称"
|
v-if="loanArr[index].operateuserName.visible"
|
prop="operateuserName"
|
>
|
<el-input v-model="loanForm[index].operateuserName" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="报单人直属机构"
|
v-if="loanArr[index].operateorgName.visible"
|
prop="operateorgName"
|
>
|
<el-input v-model="loanForm[index].operateorgName" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="报单人所属一级内部机构"
|
v-if="loanArr[index].operatefirstinternallevel.visible"
|
prop="operatefirstinternallevel"
|
>
|
<el-input v-model="loanForm[index].operatefirstinternallevelName" disabled></el-input>
|
</el-form-item>
|
<el-form-item label="报单日期" v-if="loanArr[index].inputdate.visible" prop="inputdate">
|
<el-input v-model="loanForm[index].inputdate" disabled></el-input>
|
</el-form-item>
|
</div>
|
</div>
|
<div class="_block" v-if="loanArr[index].designfeetotalamt.visible || loanArr[index].customerbaseelement.visible">
|
<p class="title">
|
<span></span>
|
产品个性化信息
|
</p>
|
<div class="form">
|
<el-form-item label="加盟总费用" v-if="loanArr[index].designfeetotalamt.visible" prop="designfeetotalamt">
|
<el-input
|
v-model="loanForm[index].designfeetotalamt"
|
:disabled="!loanArr[index].designfeetotalamt.writeAble"
|
@blur="loanForm[index].designfeetotalamt = formatMoney(loanForm[index].designfeetotalamt)"
|
>
|
</el-input>
|
</el-form-item>
|
<el-form-item label="月均流水" v-if="loanArr[index].monthavarageflow.visible" prop="monthavarageflow">
|
<el-input
|
v-model="loanForm[index].monthavarageflow"
|
:disabled="!loanArr[index].monthavarageflow.writeAble"
|
@blur="loanForm[index].monthavarageflow = formatMoney(loanForm[index].monthavarageflow)"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="代理/经销/加盟商类型" v-if="loanArr[index].entbusinessmodel.visible" prop="entbusinessmodel">
|
<el-select
|
v-model="loanForm[index].entbusinessmodel"
|
:disabled="!loanArr[index].entbusinessmodel.writeAble"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
>
|
<el-option
|
v-for="(item,index) in entbusinessList"
|
:key="index"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="客群核心要素" v-if="loanArr[index].customerbaseelement.visible" prop="customerbaseelement">
|
<el-select
|
v-model="loanForm[index].customerbaseelement"
|
:disabled="!loanArr[index].customerbaseelement.writeAble"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
>
|
<el-option
|
v-for="(item,index) in customerBaseElement"
|
:key="index"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
</div>
|
</div>
|
<div class="_block" v-if="applyInfo.phaseNo>='0040'">
|
<p class="title">
|
<span></span>
|
账户信息
|
</p>
|
<div class="form">
|
<el-form-item label="贷款发放商家标志">
|
<el-input v-show="false" v-model="loanForm[index].loanStoreFlag" disabled></el-input>
|
<el-input v-model="loanForm[index].loanStoreFlagDesc" disabled></el-input>
|
</el-form-item>
|
<el-form-item
|
label="收款银行开户行"
|
v-if="loanArr[index].putoutbankno.visible"
|
prop="putoutbankno"
|
>
|
<el-select
|
v-model="loanForm[index].putoutbankno"
|
:disabled="!loanArr[index].putoutbankno.writeAble"
|
@change="selputoutbankno"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
>
|
<el-option
|
v-for="item in putoutbankList"
|
:key="item.itemno"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item
|
label="收款银行户名"
|
v-if="loanArr[index].putoutbankname.visible"
|
prop="putoutbankname"
|
>
|
<el-input
|
v-model="loanForm[index].putoutbankname"
|
:disabled="!loanArr[index].putoutbankname.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="收款银行账号"
|
v-if="loanArr[index].putoutcardno.visible"
|
prop="putoutcardno"
|
>
|
<el-input
|
v-model="loanForm[index].putoutcardno"
|
:disabled="!loanArr[index].putoutcardno.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="收款银行开户行所在省"
|
v-if="loanArr[index].putoutbankprovince.visible"
|
prop="putoutbankprovince"
|
>
|
<el-select
|
v-model="loanForm[index].putoutbankprovince"
|
filterable
|
clearable
|
placeholder="支持输入搜索选择"
|
:disabled="!loanArr[index].putoutbankprovince.writeAble"
|
@change="getprovince(loanForm[index].putoutbankprovince,'putoutbankcityList',loanForm[index],function(arr){putoutbankcityList=arr})"
|
>
|
<el-option
|
v-for="(item,index) in provinceList"
|
:key="index"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item
|
label="收款银行开户行所在市"
|
v-if="loanArr[index].putoutbankcity.visible"
|
prop="putoutbankcity"
|
>
|
<el-select
|
v-model="loanForm[index].putoutbankcity"
|
filterable
|
clearable
|
placeholder="支持输入搜索选择"
|
:disabled="!loanArr[index].putoutbankcity.writeAble"
|
>
|
<el-option
|
v-for="(item,index) in putoutbankcityList"
|
:key="index"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item
|
label="收款银行开户分支行"
|
v-if="loanArr[index].putoutbankbranchno.visible"
|
prop="putoutbankbranchno"
|
>
|
<el-input
|
v-model="loanForm[index].putoutbankbranchname"
|
:disabled="!loanArr[index].putoutbankbranchno.writeAble"
|
class="input-with-select"
|
>
|
<el-button slot="append" icon="el-icon-search" v-if="loanArr[index].putoutbankbranchno.writeAble" @click="getBankBranch"></el-button>
|
</el-input>
|
</el-form-item>
|
<el-form-item
|
label="收款银行开户行地址"
|
v-if="loanArr[index].putoutbankaddr.visible"
|
prop="putoutbankaddr"
|
>
|
<el-input
|
v-model="loanForm[index].putoutbankaddr"
|
:disabled="!loanArr[index].putoutbankaddr.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label=" "
|
class="is_btn"
|
v-if="loanArr[index].repaymentbankno.writeAble&&loanArr[index].repaymentbankno.visible&&loanArr[index].putoutbankno.visible">
|
<el-button
|
plain
|
size="small"
|
class="is_background"
|
@click="copyPutoutbankToRepaymentbank(loanForm[index])"
|
>还款卡与收款卡相同</el-button>
|
</el-form-item>
|
<el-form-item
|
label="还款银行开户行"
|
v-if="loanArr[index].repaymentbankno.visible"
|
prop="repaymentbankno"
|
>
|
<el-select
|
v-model="loanForm[index].repaymentbankno"
|
:disabled="!loanArr[index].repaymentbankno.writeAble"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
>
|
<el-option
|
v-for="item in repaymentbankList"
|
:key="item.itemno"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item
|
label="还款银行户名"
|
v-if="loanArr[index].repaymentbankname.visible"
|
prop="repaymentbankname"
|
>
|
<el-input
|
v-model="loanForm[index].repaymentbankname"
|
:disabled="!loanArr[index].repaymentbankname.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="还款银行账号"
|
v-if="loanArr[index].repaymentcardno.visible"
|
prop="repaymentcardno"
|
>
|
<el-input
|
v-model="loanForm[index].repaymentcardno"
|
:disabled="!loanArr[index].repaymentcardno.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="还款银行预留手机号"
|
v-if="loanArr[index].repaymentbankphone.visible"
|
prop="repaymentbankphone"
|
>
|
<el-input
|
v-model="loanForm[index].repaymentbankphone"
|
:disabled="!loanArr[index].repaymentbankphone.writeAble"
|
></el-input>
|
</el-form-item>
|
</div>
|
</div>
|
<div class="_block" v-if="loanArr[index].putOutInfo&&loanArr[index].manualputoutflag.visible">
|
<p class="title">
|
<span></span>
|
放款信息
|
</p>
|
<div class="form">
|
<el-form-item label="系统放款状态" prop="sysputoutstatus" v-if="loanArr[index].sysputoutstatus.visible">
|
<el-input v-model="loanArr[index].putOutInfo.sysputoutstatus.valueDesc" disabled></el-input>
|
</el-form-item>
|
<el-form-item label="系统放款失败原因" prop="sysputoutfail" v-if="loanArr[index].sysputoutfail.visible">
|
<el-input v-model="loanForm[index].sysputoutfail" :disabled="!loanArr[index].sysputoutfail.writeAble"></el-input>
|
</el-form-item>
|
<el-form-item label="系统放款通道" prop="sysputoutchannl" v-if="loanArr[index].sysputoutchannl.visible">
|
<el-input v-model="loanArr[index].putOutInfo.sysputoutchannl.valueDesc" disabled></el-input>
|
</el-form-item>
|
<el-form-item label="人工放款标志" prop="manualputoutflag" v-if="loanArr[index].manualputoutflag.visible">
|
<el-input v-model="loanArr[index].putOutInfo.manualputoutflag.valueDesc" disabled></el-input>
|
</el-form-item>
|
<el-form-item label="放款日期" prop="putoutdate" v-if="loanArr[index].putoutdate.visible">
|
<el-date-picker
|
v-model="loanForm[index].putoutdate"
|
type="date"
|
format="yyyy/MM/dd"
|
value-format="yyyy/MM/dd"
|
size="small"
|
placeholder="选择日期"
|
:disabled="!loanArr[index].putoutdate.writeAble"
|
></el-date-picker>
|
</el-form-item>
|
<el-form-item label="线下放款账户类型" prop="offlineputoutbankno" v-if="loanArr[index].offlineputoutbankno.visible">
|
<el-select
|
v-model="loanForm[index].offlineputoutbankno"
|
clearable
|
filterable
|
placeholder="支持输入搜索选择"
|
@change="selOfflinePutoutBank"
|
>
|
<el-option
|
v-for="item in offlinePutoutBankList"
|
:key="item.itemno"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="线下放款账户号码" prop="offlineputoutaccountno" v-if="loanArr[index].offlineputoutaccountno.visible">
|
<el-input v-model="loanForm[index].offlineputoutaccountno" :disabled="!loanArr[index].offlineputoutaccountno.writeAble"></el-input>
|
</el-form-item>
|
<el-form-item label="线下放款账户名称" prop="offlineputoutaccountname" v-if="loanArr[index].offlineputoutaccountname.visible">
|
<el-input v-model="loanForm[index].offlineputoutaccountname" :disabled="!loanArr[index].offlineputoutaccountname.writeAble"></el-input>
|
</el-form-item>
|
</div>
|
</div>
|
<PriceInfo
|
v-if="applyInfo.phaseNo>='0040'&&!(loanForm[index].mergeCreditLoan=='0'&&loanForm[index].occurtype=='01')"
|
:pricingInfo="loanForm[index].pricingInfo"
|
>
|
</PriceInfo>
|
</el-form>
|
</div>
|
<div class="fixedBtn">
|
<el-button
|
size="medium"
|
plain
|
@click="saveDraft(loanForm)"
|
v-if="applyInfo.phaseNo=='0040'||applyInfo.phaseNo=='0010'"
|
>保存草稿</el-button>
|
<el-button
|
size="medium"
|
plain
|
@click="prevStep"
|
v-if="applyInfo.phaseNo=='0040'||applyInfo.phaseNo=='0010'"
|
>上一步</el-button>
|
<el-button
|
size="medium"
|
type="primary"
|
@click="submit(loanForm)"
|
v-if="applyInfo.phaseNo=='0040'||applyInfo.phaseNo=='0010'"
|
>下一步</el-button>
|
<el-button
|
size="medium"
|
plain
|
@click="save(loanForm)"
|
v-if="applyInfo.phaseNo>'0040'&&writeAble"
|
>保存</el-button>
|
<el-button
|
size="medium"
|
plain
|
@click="prevStep"
|
v-if="applyInfo.phaseNo!='0040'&&applyInfo.phaseNo!='0010'"
|
>上一页</el-button>
|
<el-button
|
size="medium"
|
type="primary"
|
@click="nextPage()"
|
v-if="applyInfo.phaseNo!='0040'&&applyInfo.phaseNo!='0010'"
|
>下一页</el-button>
|
</div>
|
<QRcode v-if="showQrcode" :visible="showQrcode" @closeQrcode="closeDialog"></QRcode>
|
<AuthResult v-if="showAuthResult" :visible="showAuthResult" @closeAuthResult="closeDialog"></AuthResult>
|
<Branch
|
v-if="showBranch"
|
:visible="showBranch"
|
:bank="loanForm[0].putoutbankno"
|
@closeBranch="closeDialog"
|
@sendBranch="sendBranch"
|
></Branch>
|
</div>
|
</template>
|
<script>
|
import { setStorage, getStorage } from "@/utils/storage";
|
import common from "@/utils/common";
|
import PriceInfo from "@views/product/components/PriceInfo";
|
import QRcode from "@views/product/components/QRcode";
|
import AuthResult from "@views/product/components/AuthResult";
|
import Branch from "@views/product/components/Branch";
|
import {
|
qryApplyDetail,
|
qryLoanTermList,
|
getDictionaryList,
|
qryCustomerBaseList,
|
getAllCityAreaList,
|
qryRepayTypeList,
|
qryZxLoanOrg,
|
qryRefereerInfo,
|
saveOrUpdatePreApplyLoan,
|
submitApplyLoan,
|
matchPurposeList,
|
tryTrialPriceInfo,
|
getBankList,
|
qryValidCoopers,
|
qryCooperQuotaAmt,
|
qryFundUnitList,
|
qryChannelQuotaAmt,
|
qryHopeLoanTermList,
|
getProvinceCodeList,
|
qryLoanOrgList
|
} from "@/api/product";
|
export default {
|
data() {
|
return {
|
applyInfo:this.$store.state.product.applyInfo,
|
applyMenu: this.$store.state.product.applyMenu,
|
initialArr: [], //初始数据
|
loanForm: [],
|
loanArr: [],
|
loanTermList: [],
|
businessTypeList: [],
|
customerBaseList: [],
|
allCityList: [],
|
repayTypeList: [],
|
zxLoanOrgList: [],
|
loanPurposeList: [],
|
putoutbankList: [],
|
repaymentbankList: [],
|
validCoopers: [],
|
entbusinessList: [],
|
customerBaseElement: [],
|
fundUnitList: [],
|
hopeLoanTermList: [],
|
provinceList: [],
|
putoutbankcityList: [],
|
signContractChannel: [],
|
offlinePutoutBankList: [],
|
rules: {},
|
showBranch: false,
|
showAuthResult: false,
|
showQrcode: false,
|
writeAble:''
|
};
|
},
|
async created() {
|
this.$parent._data.loading = true;
|
const result = await this.getApplyDetail();
|
this.getApplyData(result);
|
// 业务类型
|
this.businessTypeList = await this.qryDictionaryList(
|
"BuildingBusinessTypeCredit"
|
);
|
// 城市下拉公用方法
|
this.qryAllCityAreaList();
|
// 征信查询机构
|
this.getZxLoanOrg();
|
// 获取合作商户列表
|
this.getValidCoopers();
|
// 获取期望贷款期限
|
this.getHopeLoanTermList()
|
// 获取代理/经销/加盟商类型下拉
|
this.entbusinessList = await this.qryDictionaryList("EntBusinessModel");
|
if (this.applyInfo.phaseNo >= "0040") {
|
// 客群核心要素
|
this.customerBaseElement = await this.qryDictionaryList("CustomerBaseElement");
|
// 收款银行列表
|
this.putoutbankList = await this.qryBankList("1,3");
|
// 还款银行列表
|
this.repaymentbankList = await this.qryBankList("2,3");
|
// 获取线下放款账户类型
|
this.offlinePutoutBankList = await this.qryDictionaryList('PutOutAccountType')
|
// 借款用途
|
this.qrypurposetype();
|
// 放款资金单元查询
|
this.getFundUnitList()
|
// 获取省枚举值
|
getProvinceCodeList({}).then(res => {
|
this.provinceList = res.result;
|
});
|
// 根据省获取市
|
this.loanForm[0].putoutbankprovince
|
? this.putoutbankcityList = await common.qryCityCodeList(
|
this.loanForm[0].putoutbankprovince
|
)
|
: "";
|
}
|
if (this.applyInfo.phaseNo >= "0100") {
|
// 面签渠道
|
this.signContractChannel = await this.qryDictionaryList("SignContractChannel");
|
}
|
this.$parent._data.loading = false;
|
},
|
components: {
|
PriceInfo,
|
Branch,
|
QRcode,
|
AuthResult
|
},
|
methods: {
|
// 获取客群名称描述
|
getCustomerbasename(val){
|
const { customerBaseList, loanForm } = this
|
this.qryTrial(loanForm[0]);
|
for (let i = 0; i < customerBaseList.length; i++) {
|
if(customerBaseList[i].customersCode == val){
|
this.loanForm[0].customerbasename = customerBaseList[i].customersName
|
break
|
}
|
}
|
},
|
selOfflinePutoutBank(val){
|
for (let i = 0; i < this.offlinePutoutBankList.length; i++) {
|
if(this.offlinePutoutBankList[i].itemno == val){
|
this.loanForm[0].offlineputoutbankname = this.offlinePutoutBankList[i].itemname
|
this.loanForm[0].offlineputoutaccountno = this.offlinePutoutBankList[i].attribute1
|
this.loanForm[0].offlineputoutaccountname = this.offlinePutoutBankList[i].attribute3
|
break
|
}
|
}
|
},
|
// 查看授信详情
|
handleCredit(){
|
const { href } = this.$router.resolve({
|
path: `/comprehensiveTransaction/loanDetail/${this.loanForm[0].onlyCreditSerialno}`,
|
query: {
|
occurType: this.applyInfo.occurtype,
|
flowno: this.applyInfo.flowno,
|
objectType: this.applyInfo.objectType,
|
customerID: this.applyInfo.customerid,
|
noBackBtn:true,
|
menuId: parent.g_menu_id
|
}
|
})
|
window.open(
|
href,
|
'newwindow',
|
'height=700px, width=800px, top=100px,left=400px, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no'
|
)
|
},
|
// 客户认证结果
|
handleAuthStatus(){
|
this.showAuthResult = true
|
},
|
// 客户信息认证
|
handleQRCode(){
|
this.showQrcode = true
|
},
|
// 金额格式化
|
formatMoney(value) {
|
if (value) {
|
value =
|
parseFloat((value + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
|
if (value == "NaN") return;
|
let l = value
|
.split(".")[0]
|
.split("")
|
.reverse();
|
let r = value.split(".")[1];
|
let t = "";
|
for (let i = 0; i < l.length; i++) {
|
t += l[i] + ((i + 1) % 3 === 0 && i + 1 !== l.length ? "," : "");
|
}
|
return (
|
t
|
.split("")
|
.reverse()
|
.join("") +
|
"." +
|
r
|
);
|
}
|
},
|
// 接收子组件的传值
|
sendBranch(data){
|
this.loanForm[0].putoutbankbranchno = data.bankno
|
this.loanForm[0].putoutbankbranchname = data.bankname
|
},
|
// 监听收款银行开户行
|
selputoutbankno(){
|
// 当重新选择开户行就要更新开户行分支行
|
this.loanForm[0].putoutbankbranchno = ''
|
this.loanForm[0].putoutbankbranchname = ''
|
},
|
// 获取分支行
|
getBankBranch(){
|
if(!this.loanForm[0].putoutbankno){
|
this.$message.warning('请输入收款银行开户行')
|
return
|
}
|
this.showBranch = true
|
this.loanForm[0].putoutbankbranchno = ''
|
},
|
closeDialog(data){
|
this.showQrcode = data
|
this.showAuthResult = data
|
this.showBranch = data
|
},
|
// 获取期望贷款期限
|
getHopeLoanTermList(){
|
qryHopeLoanTermList({productCode:this.applyInfo.productID}).then(res=>{
|
this.hopeLoanTermList = res.result
|
})
|
},
|
// 放款资金单元下拉
|
getFundUnitList(){
|
qryFundUnitList({}).then(res=>{
|
this.fundUnitList = res.result
|
})
|
},
|
// 根据放款资金单元获取获取贷款机构清单
|
selfundunitno(val){
|
for (let i = 0; i < this.fundUnitList.length; i++) {
|
if(val == this.fundUnitList[i].fundunitno){
|
this.loanForm[0].fundunitremanentamt = this.formatMoney(this.fundUnitList[i].remainTotalSum)
|
this.loanForm[0].fundunitname = this.fundUnitList[i].fundunitname
|
break;
|
}
|
}
|
// 获取贷款机构清单
|
if(val){
|
qryLoanOrgList({fundUnitNo:val}).then(res=>{
|
this.loanForm[0].loanOrgList = res.result[0].orgName
|
})
|
}
|
},
|
// 选择合作商户后触发计算合作商户剩余可用额度
|
selEnterprisecode(val) {
|
this.validCoopers.forEach(value => {
|
if (val == value.serialno) {
|
this.loanForm[0].enterprisename = value.channelname;
|
}
|
});
|
// 获取合作商户剩余可用额度
|
qryCooperQuotaAmt({
|
applySerialNo: this.loanForm[0].serialno,
|
enterpriseName: this.loanForm[0].enterprisename
|
}).then(res => {
|
this.loanForm[0].enterpriseusablesum = res.result;
|
});
|
},
|
// 获取合作商户列表
|
getValidCoopers() {
|
qryValidCoopers().then(res => {
|
this.validCoopers = res.result;
|
});
|
},
|
// 还款卡与收款卡相同
|
copyPutoutbankToRepaymentbank(form) {
|
if (!form.putoutbankno) {
|
this.$message.warning("收款银行开户行不能为空");
|
return;
|
}
|
if (!form.putoutbankname) {
|
this.$message.warning("收款银行户名不能为空");
|
return;
|
}
|
if (!form.putoutcardno) {
|
this.$message.warning("收款银行账号不能为空");
|
return;
|
}
|
// 遍历判断还款银行列表是否有收款卡开户行
|
for (let i = 0; i < this.repaymentbankList.length; i++) {
|
if (this.repaymentbankList[i].itemno == form.putoutbankno) {
|
form.repaymentbankno = form.putoutbankno;
|
form.repaymentbankname = form.putoutbankname;
|
form.repaymentcardno = form.putoutcardno;
|
return;
|
}
|
}
|
// 没有直接提示不支持
|
for (let i = 0; i < this.putoutbankList.length; i++) {
|
if (this.putoutbankList[i].itemno == form.putoutbankno) {
|
form.repaymentbankno = "";
|
form.repaymentbankname = "";
|
form.repaymentcardno = "";
|
this.$message.warning(
|
"还款银行不支持" + this.putoutbankList[i].itemname
|
);
|
break;
|
}
|
}
|
},
|
// 银行列表
|
qryBankList(code) {
|
return new Promise(resolve => {
|
getBankList({
|
codeNo: "BankCode",
|
itmeNo: code
|
}).then(res => {
|
resolve(res.result);
|
});
|
});
|
},
|
// 借款用途
|
qrypurposetype() {
|
matchPurposeList({ applySerialNo: this.applyInfo.serialNo }).then(res => {
|
this.loanPurposeList = res.result;
|
});
|
},
|
// 定价信息试算
|
qryTrial(form) {
|
if (
|
(form.productcustomerscode||!this.loanArr[0].productcustomerscode.visible||!this.loanArr[0].productcustomerscode.writeAble||!this.loanArr[0].productcustomerscode.required) &&
|
(form.productcreditamtlimit||!this.loanArr[0].productcreditamtlimit.visible||!this.loanArr[0].productcreditamtlimit.writeAble) &&
|
(form.basecreditamt||!this.loanArr[0].basecreditamt.visible||!this.loanArr[0].basecreditamt.writeAble) &&
|
(form.businesssum||!this.loanArr[0].businesssum.visible) &&
|
(form.businesstermmonth||!this.loanArr[0].businesstermmonth.visible) &&
|
(form.businesstermday||!this.loanArr[0].businesstermday.visible) &&
|
(form.repaymenttype||!this.loanArr[0].repaymenttype.visible) &&
|
this.applyInfo.phaseNo >= "0040"
|
) {
|
form.businesssum = this.formatMoney(form.businesssum)
|
const obj = {
|
serialno: this.applyInfo.serialNo,
|
productcustomerscode: form.productcustomerscode,
|
businesssum: form.businesssum,
|
businesstermmonth: form.businesstermmonth,
|
businesstermday: form.businesstermday,
|
repaymenttype: form.repaymenttype,
|
productcreditamtlimit:form.productcreditamtlimit,
|
basecreditamt:form.basecreditamt
|
};
|
this.$parent._data.loading = true;
|
// 贷款金额为数字时才调用接口
|
if (/^\d{1,3}(,?\d{3})*(\.\d{1,2})?$/.test(form.businesssum)) {
|
tryTrialPriceInfo(obj).then(res => {
|
this.$parent._data.loading = false;
|
if (res.code == "00") {
|
res.result.msg = "";
|
//更新产品维度,放款金额,产品剩余可用额度
|
form.amountloan = this.formatMoney(res.result.amountloan);
|
form.productdimension = res.result.productdimension;
|
form.productdimensionname = res.result.productdimensionname;
|
form.productremanentamt = this.formatMoney(
|
res.result.productremanentamt
|
);
|
//更新账户信息的收款卡信息
|
if (form.loanStoreFlag != 0 || res.result.loanStoreFlag != 0) {
|
form.loanStoreFlag = res.result.loanStoreFlag;
|
form.loanStoreFlagDesc =
|
res.result.loanStoreFlag == 0 ? "否" : "是";
|
form.putoutbankno = res.result.putoutbankno;
|
form.putoutbankname = res.result.putoutbankname;
|
form.putoutcardno = res.result.putoutcardno;
|
form.putoutbanknoName = res.result.putoutbanknoName;
|
form.putoutbankprovince = res.result.putoutbankprovince;
|
form.putoutbankcity = res.result.putoutbankcity;
|
form.putoutbankbranchno = res.result.putoutbankbranchno;
|
form.putoutbankbranchname = res.result.putoutbankbranchname;
|
}
|
//更新定价信息
|
if (res.result.pricingInfo) {
|
form.pricingInfo = res.result.pricingInfo;
|
}
|
// 提示试算结果
|
if (res.result.flags) {
|
for (const key in res.result.flags) {
|
if (res.result.flags[key]) {
|
if (res.result.msg) {
|
res.result.msg += "," + res.result.flags[key];
|
} else {
|
res.result.msg += res.result.flags[key];
|
}
|
// 将贷款期限,还款方式,放款金额清空值
|
switch (key) {
|
case "flagBusinesssum":
|
form.businesssum = "";
|
break;
|
case "flagBusinesstermmonth":
|
form.businesstermmonth = "";
|
break;
|
case "flagRepaymenttype":
|
form.repaymenttype = "";
|
break;
|
case "flagProductcreditamtlimit":
|
form.productcreditamtlimit = "";
|
break;
|
default:
|
break;
|
}
|
// 将定价信息里面的所有字段value清空
|
for (const key in form.pricingInfo) {
|
form.pricingInfo[key] = "";
|
}
|
}
|
}
|
}
|
// 提示语
|
if(res.result.msg){
|
this.$message.warning(res.result.msg)
|
}
|
//更新贷款期限下拉选项
|
if (res.result.loanTermList.length) {
|
this.loanTermList = res.result.loanTermList;
|
for (let i = 0; i < this.loanTermList.length; i++) {
|
if (this.loanTermList[i].creditTerm == form.businesstermmonth) {
|
return;
|
}
|
}
|
form.businesstermmonth = "";
|
} else {
|
this.loanTermList = [];
|
}
|
// 更新还款方式下拉选项
|
if (res.result.repaymentTermList.length) {
|
this.repayTypeList = res.result.repaymentTermList;
|
for (let i = 0; i < this.repayTypeList.length; i++) {
|
if (
|
this.repayTypeList[i].paymentType == form.repaymenttype
|
) {
|
return;
|
}
|
}
|
form.repaymenttype = "";
|
} else {
|
this.repayTypeList = [];
|
}
|
}
|
});
|
} else {
|
this.$message.warning('贷款金额输入格式有误,请重新输入!')
|
form.businesssum = "";
|
this.$parent._data.loading = false;
|
}
|
}
|
},
|
qryDictionaryList(code) {
|
return new Promise(resolve => {
|
getDictionaryList({
|
codeNo: code
|
}).then(res => {
|
resolve(res.result);
|
});
|
});
|
},
|
// 根据贷款期限获取还款方式
|
qryRepaymenttype() {
|
if (
|
(this.loanForm[0].productcustomerscode||!this.loanArr[0].productcustomerscode.visible||!this.loanArr[0].productcustomerscode.writeAble||!this.loanArr[0].productcustomerscode.required) &&
|
(this.loanForm[0].productcreditamtlimit||!this.loanArr[0].productcreditamtlimit.visible||!this.loanArr[0].productcreditamtlimit.writeAble) &&
|
(this.loanForm[0].basecreditamt||!this.loanArr[0].basecreditamt.visible||!this.loanArr[0].basecreditamt.writeAble) &&
|
(this.loanForm[0].businesssum||!this.loanArr[0].businesssum.visible) &&
|
(this.loanForm[0].businesstermmonth||!this.loanArr[0].businesstermmonth.visible) &&
|
(this.loanForm[0].businesstermday||!this.loanArr[0].businesstermday.visible) &&
|
(this.loanForm[0].repaymenttype||!this.loanArr[0].repaymenttype.visible) &&
|
this.applyInfo.phaseNo >= "0040"
|
) {
|
this.qryTrial(this.loanForm[0]);
|
} else {
|
this.getRepayTypeList();
|
}
|
},
|
// 根据还款方式获取贷款期限下拉
|
qryHopebusinesstermmonth(val) {
|
if (
|
(this.loanForm[0].productcustomerscode||!this.loanArr[0].productcustomerscode.visible||!this.loanArr[0].productcustomerscode.writeAble||!this.loanArr[0].productcustomerscode.required) &&
|
(this.loanForm[0].productcreditamtlimit||!this.loanArr[0].productcreditamtlimit.visible||!this.loanArr[0].productcreditamtlimit.writeAble) &&
|
(this.loanForm[0].basecreditamt||!this.loanArr[0].basecreditamt.visible||!this.loanArr[0].basecreditamt.writeAble) &&
|
(this.loanForm[0].businesssum||!this.loanArr[0].businesssum.visible) &&
|
(this.loanForm[0].businesstermmonth||!this.loanArr[0].businesstermmonth.visible) &&
|
(this.loanForm[0].businesstermday||!this.loanArr[0].businesstermday.visible) &&
|
(this.loanForm[0].repaymenttype||!this.loanArr[0].repaymenttype.visible) &&
|
this.applyInfo.phaseNo >= "0040"
|
) {
|
this.qryTrial(this.loanForm[0]);
|
} else {
|
// 如果是termunit='D', 还款方式变化时,永不用调接口的“/qryLoanTermList”
|
if(this.loanForm[0].termunit != 'D'){
|
this.getLoanTermList();
|
}
|
}
|
},
|
// 处理数据,并校验规则
|
getApplyData(result) {
|
this.loanArr = [];
|
this.loanForm = [];
|
this.initialArr = [];
|
this.loanArr.push(result);
|
// 初始化数据和校验规则
|
this.loanArr.forEach((val, index) => {
|
// 将数据重新排列
|
const obj = {};
|
for (const key in val) {
|
if(key == 'putOutInfo'){
|
for (const child in val[key]) {
|
val[child] = val[key][child]
|
}
|
}
|
}
|
for (const key in val) {
|
// 格式化金额
|
if (
|
key == "amountloan" ||
|
key == "projectSum" ||
|
key == "enterpriseusablesum" ||
|
key == "fundunitremanentamt" ||
|
key == "basecreditamt" ||
|
key == "productcreditamtlimit" ||
|
key == "productremanentamt" ||
|
key == "riskbasecreditamt" ||
|
key == "riskproductcreditamt" ||
|
key == "whiteadvisebaseamt" ||
|
key == "whiteexecbaseamt" ||
|
key == "whiteadviseproductamt" ||
|
key == "whiteexecproductamt" ||
|
key == "designfeetotalamt" ||
|
key == "surplusamt" ||
|
key == "entlimitamount" ||
|
key == "monthavarageflow"
|
) {
|
val[key].value = this.formatMoney(val[key].value);
|
}
|
// 自定义校验规则,涉及金额将进行格式化
|
this.rules[key] = [];
|
switch (key) {
|
case "hopebusinesssum":
|
val[key].value = this.formatMoney(val[key].value);
|
break;
|
case "businesssum":
|
val[key].value = this.formatMoney(val[key].value);
|
break;
|
case "putoutbankname":
|
this.rules[key].push(common.validate("bankName"));
|
break;
|
case "repaymentbankname":
|
this.rules[key].push(common.validate("bankName"));
|
break;
|
case "hopebusinesstermday":
|
this.rules[key].push(common.validate("number"));
|
break;
|
case "businesstermday":
|
this.rules[key].push(common.validate("number"));
|
break;
|
case "putoutcardno":
|
this.rules[key].push(common.validate("number"));
|
break;
|
case "repaymentcardno":
|
this.rules[key].push(common.validate("number"));
|
break;
|
default:
|
break;
|
}
|
if (val[key].required) {
|
this.rules[key].push({
|
required: true,
|
message: `请输入${val[key].filedDescription}`,
|
trigger: "change"
|
});
|
}
|
// 如果是定价信息不能直接置空
|
if (key != "pricingInfo" && key != 'putOutInfo') {
|
obj[key] = val[key].value;
|
val[key].value = ""
|
obj["loanStoreFlagDesc"] =
|
val["loanStoreFlag"].value == 1 ? "是" : "否";
|
} else {
|
obj[key] = val[key];
|
}
|
}
|
if (this.applyInfo.phaseNo == "0100") {
|
obj.signcontractchannel = '02'
|
}
|
this.loanForm.push(obj);
|
this.initialArr.push(Object.assign({}, obj));
|
});
|
// 根据字段判断是否显示保存按钮
|
this.writeAble =
|
this.loanArr[0].businesssum.writeAble ||
|
this.loanArr[0].basecreditamt.writeAble ||
|
(this.loanArr[0].putOutInfo &&
|
this.loanArr[0].putOutInfo.putoutdate.writeAble);
|
// 贷款期限
|
this.loanArr[0].businesstermmonth.visible?this.getLoanTermList():''
|
// 还款方式
|
this.loanArr[0].repaymenttype.visible?this.getRepayTypeList():''
|
// 产品客群
|
this.getCustomerBaseList();
|
},
|
// 查询贷款申请信息
|
getApplyDetail() {
|
return new Promise(resolve => {
|
qryApplyDetail({ serialNo: this.applyInfo.serialNo }).then(res => {
|
resolve(res.result);
|
});
|
});
|
},
|
// 期望贷款期限
|
getLoanTermList() {
|
qryLoanTermList({
|
termUnit: this.loanForm[0].termunit,
|
productCode: this.loanForm[0].productid,
|
repaymentType: this.loanForm[0].repaymenttype,
|
dimensionCode: this.loanForm[0].productdimension
|
}).then(res => {
|
this.loanTermList = res.result;
|
});
|
},
|
// 产品客群
|
getCustomerBaseList() {
|
qryCustomerBaseList({
|
productCode: this.loanForm[0].productid,
|
applySerialNo: this.applyInfo.serialNo
|
}).then(res => {
|
this.customerBaseList = res.result;
|
});
|
},
|
// 城市公用列表
|
qryAllCityAreaList() {
|
getAllCityAreaList({ queryFlag: "02" }).then(res => {
|
this.allCityList = res.result;
|
});
|
},
|
// 还款方式
|
getRepayTypeList() {
|
qryRepayTypeList({
|
termUnit: this.loanForm[0].termunit,
|
productCode: this.loanForm[0].productid,
|
creditTerm: this.loanForm[0].businesstermmonth,
|
dimensionCode: this.loanForm[0].productdimension
|
}).then(res => {
|
this.repayTypeList = res.result;
|
});
|
},
|
// 征信查询机构
|
getZxLoanOrg() {
|
qryZxLoanOrg({}).then(res => {
|
this.zxLoanOrgList = [];
|
res.result.forEach(val => {
|
const obj = {};
|
obj.orgname = val.orgname;
|
obj.orgcode = val.orgcode;
|
this.zxLoanOrgList.push(obj);
|
});
|
});
|
},
|
// 根据推荐人手机号获取推荐人信息并且自动获取渠道剩余额度
|
getRefereerInfo(code, i) {
|
const obj = {
|
getFromType: i
|
};
|
obj[code] = this.loanForm[0][code.toLowerCase()];
|
qryRefereerInfo(obj).then(res => {
|
if (res.code == "00") {
|
this.loanForm[0].refereephone = res.result.refereePhone;
|
this.loanForm[0].refereeid = res.result.refereeID;
|
this.loanForm[0].refereename = res.result.refereeName;
|
this.loanForm[0].refereeorgid = res.result.refereeOrgID;
|
this.loanForm[0].refereeorgname = res.result.refereeOrgName;
|
this.loanForm[0].refereefirstinternallevelName =
|
res.result.refereefirstinternallevelName;
|
this.loanForm[0].refereefirstinternallevel =
|
res.result.refereefirstinternallevel;
|
// 获取渠道剩余可用额度
|
qryChannelQuotaAmt({
|
applySerialNo:this.applyInfo.serialNo,
|
refereeorgid:this.loanForm[0].refereeid
|
}).then(res=>{
|
this.loanForm[0].surplusamt = this.formatMoney(res.result)
|
})
|
}
|
});
|
},
|
selpurposetype(val) {
|
this.loanPurposeList.forEach(value => {
|
if (value.purposeType == val) {
|
this.loanForm[0].purposedescription = value.purposeDescription;
|
}
|
});
|
},
|
//将选中征信查询机构的对象值进行处理
|
selCreditorg(val) {
|
this.zxLoanOrgList.forEach(value => {
|
if (value.orgcode == val) {
|
this.loanForm[0].creditorgname = value.orgname;
|
}
|
});
|
},
|
// 保存接口
|
saveApplyLoan(arr) {
|
return new Promise(resolve => {
|
saveOrUpdatePreApplyLoan(arr[0]).then(res => {
|
resolve(res);
|
});
|
});
|
},
|
// 提交接口
|
async getSubmitApplyLoan(arr) {
|
this.$parent._data.loading = true;
|
const { code } = await submitApplyLoan(arr[0]);
|
if (code == "00") {
|
const result = await this.getApplyDetail();
|
this.getApplyData(result);
|
this.nextPage()
|
}
|
this.$parent._data.loading = false;
|
},
|
// 贷款申请保存并且校验数据完整性
|
async save(arr) {
|
if(!common.validateForm(this.$refs.loanForm).flag)return;
|
this.$parent._data.loading = true;
|
const res = await this.saveApplyLoan(arr);
|
if (res.code == "00") {
|
const result = await this.getApplyDetail();
|
this.getApplyData(result);
|
this.$message.success("保存成功");
|
}
|
this.$parent._data.loading = false;
|
},
|
// 贷款申请保存草稿
|
async saveDraft(arr) {
|
this.$parent._data.loading = true;
|
const res = await this.saveApplyLoan(arr);
|
if (res.code == "00") {
|
const result = await this.getApplyDetail();
|
this.getApplyData(result);
|
this.$message.success("保存成功");
|
// 保存草稿需要调用父组件的查询左侧tab的方法
|
this.$parent.getApplyTabTree();
|
}
|
this.$parent._data.loading = false;
|
},
|
// 上一步
|
prevStep() {
|
this.applyMenu.forEach((val, index) => {
|
if (val.tabname == "贷款申请信息") {
|
common.tabInfo(
|
this.applyMenu[index - 1].tabname,
|
this.applyInfo.flowno,
|
this
|
);
|
}
|
});
|
},
|
// 下一页
|
nextPage() {
|
// 调用父组件的查询左侧tab的方法
|
this.$parent.updateApplyTabTree('贷款申请信息');
|
},
|
// 查询凭证信息
|
getVoucherList() {
|
return new Promise(resolve => {
|
qryVoucherList({ businessNo: this.applyInfo.serialNo }).then(res => {
|
resolve(res.result);
|
});
|
});
|
},
|
// 下一步并校验必须至少填写一个凭证信息
|
async submit(arr) {
|
if(!common.validateForm(this.$refs.loanForm).flag)return;
|
const { phaseNo } = this.applyInfo;
|
this.getSubmitApplyLoan(arr);
|
}
|
},
|
beforeRouteLeave(to, from, next) {
|
for (let i = 0; i < this.loanForm.length; i++) {
|
for (const key in this.loanForm[i]) {
|
if (this.initialArr[i].hasOwnProperty(key)) {
|
if (this.loanForm[i][key] != this.initialArr[i][key]) {
|
// 页面有数据未保存
|
common.comfirm("提示", "当前页面有数据未保存,是否放弃保存?", () => {
|
next();
|
});
|
return;
|
}
|
}
|
}
|
}
|
next();
|
}
|
};
|
</script>
|