<template>
|
<div class="product">
|
<div v-for="(item,index) in loanEnterpriseArr" :key="index">
|
<el-form
|
:model="loanEnterpriseForm[index]"
|
:rules="rules"
|
ref="loanEnterpriseForm"
|
size="small"
|
inline
|
label-width="165px"
|
>
|
<div class="_block">
|
<p class="title">
|
<span></span>
|
基本信息
|
</p>
|
<div class="form">
|
<el-form-item
|
label="客户编号"
|
v-if="item.customerid.visible"
|
prop="customerid"
|
:class="{'isDifferent':item.customerid.isDifferent}"
|
>
|
<el-input
|
v-model="loanEnterpriseForm[index].customerid"
|
:disabled="!item.customerid.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="企业名称"
|
v-if="item.customername.visible"
|
prop="customername"
|
:class="{'isDifferent':item.customername.isDifferent}"
|
>
|
<el-input
|
maxlength="100"
|
v-model="loanEnterpriseForm[index].customername"
|
:disabled="!item.applyserialno.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="统一社会信用代码"
|
v-if="item.reditcode.visible"
|
prop="reditcode"
|
:class="{'isDifferent':item.reditcode.isDifferent}"
|
>
|
<el-input
|
maxlength="50"
|
v-model="loanEnterpriseForm[index].reditcode"
|
:disabled="!item.applyserialno.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="注册时间"
|
v-if="item.registerdate.visible"
|
prop="registerdate"
|
:class="{'isDifferent':item.registerdate.isDifferent}"
|
>
|
<el-date-picker
|
v-model="loanEnterpriseForm[index].registerdate"
|
type="date"
|
format="yyyy/MM/dd"
|
value-format="yyyy/MM/dd"
|
size="small"
|
placeholder="选择日期"
|
:disabled="!item.registerdate.writeAble"
|
></el-date-picker>
|
</el-form-item>
|
<el-form-item
|
label="注册地址(省)"
|
v-if="item.registerprovince.visible"
|
prop="registerprovince"
|
:class="{'isDifferent':item.registerprovince.isDifferent}"
|
>
|
<el-select
|
v-model="loanEnterpriseForm[index].registerprovince"
|
filterable
|
clearable
|
placeholder="支持输入搜索选择"
|
:disabled="!item.registerprovince.writeAble"
|
@change="getprovince(loanEnterpriseForm[index].registerprovince,'registercityList',loanEnterpriseForm[index],function(arr){registercityList=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="item.registercity.visible"
|
prop="registercity"
|
:class="{'isDifferent':item.registercity.isDifferent}"
|
>
|
<el-select
|
v-model="loanEnterpriseForm[index].registercity"
|
filterable
|
clearable
|
:disabled="!item.registercity.writeAble"
|
placeholder="支持输入搜索选择"
|
@change="getcity(loanEnterpriseForm[index].registercity,'registerareList',loanEnterpriseForm[index],function(arr){registerareList=arr})"
|
>
|
<el-option
|
v-for="(item,index) in registercityList"
|
:key="index"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item
|
label="注册地址(区)"
|
v-if="item.registerare.visible"
|
prop="registerare"
|
:class="{'isDifferent':item.registerare.isDifferent}"
|
>
|
<el-select
|
v-model="loanEnterpriseForm[index].registerare"
|
filterable
|
clearable
|
:disabled="!item.registerare.writeAble"
|
placeholder="支持输入搜索选择"
|
>
|
<el-option
|
v-for="(item,index) in registerareList"
|
:key="index"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item
|
label="注册地址(街道/小区/楼栋/房号)"
|
v-if="item.registeraddress.visible"
|
prop="registeraddress"
|
:class="{'isDifferent':item.registeraddress.isDifferent}"
|
>
|
<el-input
|
maxlength="100"
|
v-model="loanEnterpriseForm[index].registeraddress"
|
:disabled="!item.registeraddress.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="实际经营地址(省)"
|
v-if="item.companyprovince.visible"
|
prop="companyprovince"
|
:class="{'isDifferent':item.companyprovince.isDifferent}"
|
>
|
<el-select
|
v-model="loanEnterpriseForm[index].companyprovince"
|
filterable
|
clearable
|
placeholder="支持输入搜索选择"
|
:disabled="!item.companyprovince.writeAble"
|
@change="getprovince(loanEnterpriseForm[index].companyprovince,'companycityList',loanEnterpriseForm[index],function(arr){companycityList=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="item.companycity.visible"
|
prop="companycity"
|
:class="{'isDifferent':item.companycity.isDifferent}"
|
>
|
<el-select
|
v-model="loanEnterpriseForm[index].companycity"
|
filterable
|
clearable
|
:disabled="!item.companycity.writeAble"
|
placeholder="支持输入搜索选择"
|
@change="getcity(loanEnterpriseForm[index].companycity,'companycountyList',loanEnterpriseForm[index],function(arr){companycountyList=arr})"
|
>
|
<el-option
|
v-for="(item,index) in companycityList"
|
:key="index"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item
|
label="实际经营地址(区)"
|
v-if="item.companycounty.visible"
|
prop="companycounty"
|
:class="{'isDifferent':item.companycounty.isDifferent}"
|
>
|
<el-select
|
v-model="loanEnterpriseForm[index].companycounty"
|
filterable
|
clearable
|
:disabled="!item.companycounty.writeAble"
|
placeholder="支持输入搜索选择"
|
>
|
<el-option
|
v-for="(item,index) in companycountyList"
|
:key="index"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item
|
label="实际经营地址(街道/小区/楼栋/房号)"
|
v-if="item.companyaddress.visible"
|
prop="companyaddress"
|
:class="{'isDifferent':item.companyaddress.isDifferent}"
|
>
|
<el-input
|
maxlength="100"
|
v-model="loanEnterpriseForm[index].companyaddress"
|
:disabled="!item.companyaddress.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="注册资本"
|
v-if="item.registeredcapital.visible"
|
prop="registeredcapital"
|
:class="{'isDifferent':item.registeredcapital.isDifferent}"
|
>
|
<el-input
|
maxlength="15"
|
v-model="loanEnterpriseForm[index].registeredcapital"
|
:disabled="!item.registeredcapital.writeAble"
|
@blur="loanEnterpriseForm[index].registeredcapital = formatMoney(loanEnterpriseForm[index].registeredcapital)"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="实缴资本"
|
v-if="item.actualedcapital.visible"
|
prop="actualedcapital"
|
:class="{'isDifferent':item.actualedcapital.isDifferent}"
|
>
|
<el-input
|
maxlength="15"
|
v-model="loanEnterpriseForm[index].actualedcapital"
|
:disabled="!item.actualedcapital.writeAble"
|
@blur="loanEnterpriseForm[index].actualedcapital = formatMoney(loanEnterpriseForm[index].actualedcapital)"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="企业电话"
|
v-if="item.companytel.visible"
|
prop="companytel"
|
:class="{'isDifferent':item.companytel.isDifferent}"
|
>
|
<el-input
|
maxlength="20"
|
v-model="loanEnterpriseForm[index].companytel"
|
:disabled="!item.companytel.writeAble"
|
></el-input>
|
</el-form-item>
|
</div>
|
</div>
|
<div class="_block">
|
<p class="title">
|
<span></span>
|
基本户信息
|
</p>
|
<div class="form">
|
<el-form-item
|
label="收款银行户名"
|
v-if="item.putoutbankname.visible"
|
prop="putoutbankname"
|
:class="{'isDifferent':item.putoutbankname.isDifferent}"
|
>
|
<el-input
|
maxlength="100"
|
v-model="loanEnterpriseForm[index].putoutbankname"
|
:disabled="!item.putoutbankname.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="收款银行账号"
|
v-if="item.putoutcardno.visible"
|
prop="putoutcardno"
|
:class="{'isDifferent':item.putoutcardno.isDifferent}"
|
>
|
<el-input
|
maxlength="50"
|
v-model="loanEnterpriseForm[index].putoutcardno"
|
:disabled="!item.putoutcardno.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="收款银行开户行"
|
v-if="item.putoutbankname.visible"
|
prop="putoutbankname"
|
:class="{'isDifferent':item.putoutbankname.isDifferent}"
|
>
|
<el-select
|
v-model="loanEnterpriseForm[index].putoutbankno"
|
:disabled="!item.putoutbankname.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="item.putoutbankbranchname.visible"
|
prop="putoutbankbranchname"
|
:class="{'isDifferent':item.putoutbankbranchname.isDifferent}"
|
>
|
<el-input
|
v-model="loanEnterpriseForm[index].putoutbankbranchname"
|
:disabled="!item.putoutbankbranchname.writeAble"
|
class="input-with-select"
|
>
|
<el-button
|
slot="append"
|
icon="el-icon-search"
|
v-if="item.putoutbankbranchname.writeAble"
|
@click="getBankBranch"
|
></el-button>
|
</el-input>
|
</el-form-item>
|
<el-form-item
|
label="收款银行开户行地址"
|
v-if="item.putoutbankaddr.visible"
|
prop="putoutbankaddr"
|
:class="{'isDifferent':item.putoutbankaddr.isDifferent}"
|
>
|
<el-input
|
maxlength="100"
|
v-model="loanEnterpriseForm[index].putoutbankaddr"
|
:disabled="!item.putoutbankaddr.writeAble"
|
></el-input>
|
</el-form-item>
|
</div>
|
</div>
|
<div class="_block">
|
<p class="title">
|
<span></span>
|
公司资质
|
</p>
|
<div class="form">
|
<Aptitude v-on:sendAptList="sendAptList"></Aptitude>
|
</div>
|
</div>
|
<div class="_block">
|
<p class="title">
|
<span></span>
|
实际控制人信息
|
</p>
|
<div class="form">
|
<el-form-item
|
label="实际控制人姓名"
|
v-if="item.controlpeoplename.visible"
|
prop="controlpeoplename"
|
:class="{'isDifferent':item.controlpeoplename.isDifferent}"
|
>
|
<el-input
|
maxlength="50"
|
v-model="loanEnterpriseForm[index].controlpeoplename"
|
:disabled="!item.controlpeoplename.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="实际控制人证件类型"
|
v-if="item.controlpeoplencertype.visible"
|
prop="controlpeoplencertype"
|
:class="{'isDifferent':item.controlpeoplencertype.isDifferent}"
|
>
|
<el-select
|
v-model="loanEnterpriseForm[index].controlpeoplencertype"
|
filterable
|
clearable
|
placeholder="支持输入搜索选择"
|
:disabled="!item.controlpeoplencertype.writeAble"
|
>
|
<el-option
|
v-for="item in certtypeList"
|
:key="item.itemno"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item
|
label="实际控制人证件号码"
|
v-if="item.controlpeoplencertid.visible"
|
prop="controlpeoplencertid"
|
:class="{'isDifferent':item.controlpeoplencertid.isDifferent}"
|
>
|
<el-input
|
v-model="loanEnterpriseForm[index].controlpeoplencertid"
|
:disabled="!item.controlpeoplencertid.writeAble"
|
@change="loanEnterpriseForm[index].controlpeoplencertid=loanEnterpriseForm[index].controlpeoplencertid.toUpperCase()"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="实际控制人职务"
|
v-if="item.controlpeopleduty.visible"
|
prop="controlpeopleduty"
|
:class="{'isDifferent':item.controlpeopleduty.isDifferent}"
|
>
|
<el-input
|
maxlength="50"
|
v-model="loanEnterpriseForm[index].controlpeopleduty"
|
:disabled="!item.controlpeopleduty.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="实际控制人手机号码"
|
v-if="item.controlpeoplenphone.visible"
|
prop="controlpeoplenphone"
|
:class="{'isDifferent':item.controlpeoplenphone.isDifferent}"
|
>
|
<el-input
|
v-model="loanEnterpriseForm[index].controlpeoplenphone"
|
:disabled="!item.controlpeoplenphone.writeAble"
|
></el-input>
|
</el-form-item>
|
</div>
|
</div>
|
<div class="_block">
|
<p class="title">
|
<span></span>
|
业务对接人信息
|
</p>
|
<div class="form">
|
<Docker :dockers="item.pickuppeopleinfolist" v-on:sendDocker="sendDocker"></Docker>
|
</div>
|
</div>
|
<div class="_block">
|
<p class="title">
|
<span></span>
|
法人信息
|
</p>
|
<div class="form">
|
<el-form-item label="法人姓名" v-if="item.corporatename.visible" prop="corporatename">
|
<el-input
|
maxlength="50"
|
v-model="loanEnterpriseForm[index].corporatename"
|
:disabled="!item.corporatename.writeAble"
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="法人证件类型"
|
v-if="item.corporatecerttype.visible"
|
prop="corporatecerttype"
|
>
|
<el-select
|
v-model="loanEnterpriseForm[index].corporatecerttype"
|
filterable
|
clearable
|
placeholder="支持输入搜索选择"
|
:disabled="!item.corporatecerttype.writeAble"
|
>
|
<el-option
|
v-for="item in certtypeList"
|
:key="item.itemno"
|
:label="item.itemname"
|
:value="item.itemno"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="法人证件号码" v-if="item.corporatecertid.visible" prop="corporatecertid">
|
<el-input
|
v-model="loanEnterpriseForm[index].corporatecertid"
|
:disabled="!item.corporatecertid.writeAble"
|
@blur="loanEnterpriseForm[index].corporatecertid=loanEnterpriseForm[index].corporatecertid.toUpperCase()"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="法人手机号码" v-if="item.corporatephone.visible" prop="corporatephone">
|
<el-input
|
v-model="loanEnterpriseForm[index].corporatephone"
|
:disabled="!item.corporatephone.writeAble"
|
></el-input>
|
</el-form-item>
|
</div>
|
</div>
|
<div class="_block">
|
<p class="title">
|
<span></span>
|
担保人信息
|
</p>
|
<div class="form">
|
<Guarantor :guarantors="item.zbdGuarantorInfoList" :certtypeList="certtypeList"></Guarantor>
|
</div>
|
</div>
|
</el-form>
|
</div>
|
<div class="fixedBtn">
|
<el-button
|
size="medium"
|
plain
|
@click="saveDraft(loanEnterpriseForm)"
|
v-if="applyInfo.phaseNo=='0010'"
|
>保存草稿</el-button>
|
<el-button
|
size="medium"
|
type="primary"
|
@click="submit(loanEnterpriseForm)"
|
v-if="applyInfo.phaseNo=='0010'"
|
>下一步</el-button>
|
<el-button
|
size="medium"
|
plain
|
@click="save(loanEnterpriseForm)"
|
v-if="applyInfo.phaseNo=='0020' || applyInfo.phaseNo=='1000'"
|
>保存</el-button>
|
<el-button
|
size="medium"
|
type="primary"
|
@click="nextPage()"
|
v-if="applyInfo.phaseNo!='0010'"
|
>下一页</el-button>
|
</div>
|
<Branch
|
v-if="showBranch"
|
:visible="showBranch"
|
:bank="loanEnterpriseForm[0].putoutbankno"
|
v-on:closeBranch="closeDialog"
|
v-on:sendBranch="sendBranch"
|
></Branch>
|
</div>
|
</template>
|
<script>
|
import {
|
qryZbdEntInfoPre,
|
getProvinceCodeList,
|
getBankList,
|
getDictionaryList,
|
saveZbdEntInfoPre,
|
qryFieldMarkDataDetail
|
} from "@api/product";
|
import { setStorage, getStorage, removeStorage } from "@/utils/storage";
|
import common from "@/utils/common";
|
import Branch from "@views/product/components/Branch";
|
import Docker from "./components/Docker";
|
import Aptitude from "./components/Aptitude";
|
import Guarantor from "./components/Guarantor";
|
export default {
|
data() {
|
return {
|
applyInfo: this.$store.state.product.applyInfo,
|
applyMenu: this.$store.state.product.applyMenu,
|
initialArr: [],
|
loanEnterpriseArr: [],
|
loanEnterpriseForm: [],
|
provinceList: [],
|
registercityList: [],
|
companycityList: [],
|
companycountyList: [],
|
registerareList: [],
|
putoutbankList: [],
|
certtypeList: [],
|
aptList: [],
|
showBranch: false,
|
rules: {}
|
};
|
},
|
async created() {
|
this.$parent._data.loading = true;
|
//获取证件类型列表
|
this.certtypeList = await this.qryDictionaryList("CertType");
|
// 收款银行列表
|
this.putoutbankList = await this.qryBankList("1,3");
|
this.qryProvinceCodeList();
|
let result = await this.getZbdEntInfoPre();
|
result = this.compareFields(result);
|
this.getLoanEnterpriseData([result]);
|
this.$parent._data.loading = false;
|
},
|
components: {
|
Branch,
|
Docker,
|
Aptitude,
|
Guarantor
|
},
|
methods: {
|
// 对比字段是否修改
|
compareFields(result) {
|
const { applyInfo } = this;
|
const { refuseFlag } = applyInfo;
|
if (refuseFlag == 1) {
|
const { businessEntInfo } = this.$store.state.product.fields;
|
for (const key in businessEntInfo) {
|
if (
|
key != "pickuppeopleinfolist" &&
|
key != "zbdGuarantorInfoList" &&
|
key != "businessAptList" &&
|
result[key].value != businessEntInfo[key]
|
) {
|
this.$set(result[key], "isDifferent", true);
|
}
|
}
|
}
|
return result;
|
},
|
// 处理返回的数据格式
|
getLoanEnterpriseData(array) {
|
this.loanEnterpriseForm = [];
|
this.initialArr = [];
|
this.loanEnterpriseArr = array;
|
this.loanEnterpriseArr.forEach(async (val, index) => {
|
for (const key in val) {
|
this.rules[key] = [];
|
// 自定义规则校验
|
switch (key) {
|
case "putoutcardno":
|
this.rules[key].push(common.validate("number"));
|
break;
|
case "corporatecertid":
|
this.rules[key].push({
|
validator: (rule, value, callback) =>
|
common.checkCertid(
|
this.loanEnterpriseForm[index].corporatecerttype,
|
value,
|
callback
|
),
|
trigger: "change"
|
});
|
break;
|
case "controlpeoplencertid":
|
this.rules[key].push({
|
validator: (rule, value, callback) =>
|
common.checkCertid(
|
this.loanEnterpriseForm[index].controlpeoplencertype,
|
value,
|
callback
|
),
|
trigger: "change"
|
});
|
break;
|
case "corporatephone":
|
this.rules[key].push(common.validate("phone"));
|
break;
|
case "controlpeoplenphone":
|
this.rules[key].push(common.validate("phone"));
|
break;
|
default:
|
break;
|
}
|
if (key == "registeredcapital" || key == "actualedcapital") {
|
val[key].value = this.formatMoney(val[key].value);
|
}
|
// 必填校验
|
if (val[key].required) {
|
this.rules[key].push({
|
required: true,
|
message: `请输入${val[key].filedDescription}`,
|
trigger: "change"
|
});
|
}
|
}
|
const obj = {};
|
for (const key in val) {
|
obj[key] = val[key].value;
|
}
|
this.loanEnterpriseForm.push(obj);
|
this.initialArr.push(JSON.parse(JSON.stringify(obj)));
|
// 根据省获取市
|
this.loanEnterpriseForm[index].registerprovince
|
? (this.registercityList = await common.qryCityCodeList(
|
this.loanEnterpriseForm[index].registerprovince
|
))
|
: "";
|
this.loanEnterpriseForm[index].companyprovince
|
? (this.companycityList = await common.qryCityCodeList(
|
this.loanEnterpriseForm[index].companyprovince
|
))
|
: "";
|
// 根据市获取区
|
this.loanEnterpriseForm[index].registercity
|
? (this.registerareList = await common.qryAreaCodeList(
|
this.loanEnterpriseForm[index].registercity
|
))
|
: "";
|
this.loanEnterpriseForm[index].companycity
|
? (this.companycountyList = await common.qryAreaCodeList(
|
this.loanEnterpriseForm[index].companycity
|
))
|
: "";
|
});
|
},
|
// 金额格式化
|
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
|
);
|
}
|
},
|
// 查询借款企业信息详情
|
getZbdEntInfoPre() {
|
const obj = {
|
channel: "00",
|
objectType: this.applyInfo.objectType,
|
serialNo: this.applyInfo.serialNo
|
};
|
return new Promise(resolve => {
|
qryZbdEntInfoPre(obj).then(res => {
|
resolve(res.result);
|
});
|
});
|
},
|
// 监听收款银行开户行
|
selputoutbankno() {
|
// 当重新选择开户行就要更新开户行分支行
|
this.loanEnterpriseForm[0].putoutbankbranchno = "";
|
this.loanEnterpriseForm[0].putoutbankbranchname = "";
|
// 获取开户行中文名
|
for (let i = 0; i < this.putoutbankList.length; i++) {
|
if (
|
this.putoutbankList[i].itemno ==
|
this.loanEnterpriseForm[0].putoutbankno
|
) {
|
this.loanEnterpriseForm[0].putoutbankchinaname = this.putoutbankList[
|
i
|
].itemname;
|
break;
|
}
|
}
|
},
|
// 字典接口
|
qryDictionaryList(code) {
|
return new Promise(resolve => {
|
getDictionaryList({
|
codeNo: code
|
}).then(res => {
|
resolve(res.result);
|
});
|
});
|
},
|
// 获取省枚举值
|
qryProvinceCodeList() {
|
getProvinceCodeList({}).then(res => {
|
this.provinceList = res.result;
|
});
|
},
|
closeDialog(data) {
|
this.showBranch = data;
|
},
|
// 子组件回传分支行信息
|
sendBranch(data) {
|
this.loanEnterpriseForm[0].putoutbankbranchno = data.bankno;
|
this.loanEnterpriseForm[0].putoutbankbranchname = data.bankname;
|
},
|
//子组件回传公司资质信息
|
sendAptList(data) {
|
this.aptList = data;
|
},
|
// 子组件回传业务对接人信息
|
sendDocker(data) {
|
this.loanEnterpriseArr[0].pickuppeopleinfolist = data;
|
},
|
// 获取分支行
|
getBankBranch() {
|
if (!this.loanEnterpriseForm[0].putoutbankno) {
|
this.$message.warning("请输入收款银行开户行");
|
return;
|
}
|
this.showBranch = true;
|
this.loanEnterpriseForm[0].putoutbankbranchno = "";
|
},
|
// 银行列表
|
qryBankList(code) {
|
return new Promise(resolve => {
|
getBankList({
|
codeNo: "BankCode",
|
itmeNo: code
|
}).then(res => {
|
resolve(res.result);
|
});
|
});
|
},
|
// 保存草稿
|
saveDraft(array) {
|
// ischeck为false代表是保存,为true代表是提交
|
this.$parent._data.loading = true;
|
array[0].ischeck = false;
|
saveZbdEntInfoPre(array[0]).then(async res => {
|
this.$parent._data.loading = false;
|
if (res.code == "00") {
|
this.$message.success("保存成功");
|
const result = await this.getZbdEntInfoPre();
|
this.getLoanEnterpriseData([result]);
|
// 保存草稿需要调用父组件的查询左侧tab的方法
|
this.$parent.getApplyTabTree();
|
}
|
});
|
},
|
// 保存并校验数据完整性
|
save(array) {
|
if (!common.validateForm(this.$refs.loanEnterpriseForm).flag) return;
|
if (!this.aptList.length) {
|
this.$message.warning("至少填写一个公司资质信息");
|
return;
|
}
|
if (!this.loanEnterpriseArr[0].pickuppeopleinfolist.length) {
|
this.$message.warning("至少填写一个业务对接人信息");
|
return;
|
}
|
// ischeck为false代表是保存,为true代表是提交
|
this.$parent._data.loading = true;
|
array[0].ischeck = false;
|
saveZbdEntInfoPre(array[0]).then(async res => {
|
this.$parent._data.loading = false;
|
if (res.code == "00") {
|
this.$message.success("保存成功");
|
const result = await this.getZbdEntInfoPre();
|
this.getLoanEnterpriseData([result]);
|
}
|
});
|
},
|
// 下一步提交
|
submit(array) {
|
if (!common.validateForm(this.$refs.loanEnterpriseForm).flag) return;
|
if (!this.aptList.length) {
|
this.$message.warning("至少填写一个公司资质信息");
|
return;
|
}
|
if (!this.loanEnterpriseArr[0].pickuppeopleinfolist.length) {
|
this.$message.warning("至少填写一个业务对接人信息");
|
return;
|
}
|
// ischeck为false代表是保存,为true代表是提交
|
this.$parent._data.loading = true;
|
array[0].ischeck = true;
|
saveZbdEntInfoPre(array[0]).then(async res => {
|
this.$parent._data.loading = false;
|
if (res.code == "00") {
|
const result = await this.getZbdEntInfoPre();
|
this.getLoanEnterpriseData([result]);
|
this.nextPage();
|
}
|
});
|
},
|
// 下一页
|
nextPage() {
|
// 调用父组件的查询左侧tab的方法
|
this.$parent.updateApplyTabTree("借款企业信息");
|
}
|
},
|
beforeRouteLeave(to, from, next) {
|
!this.loanEnterpriseForm.length ||
|
common.compareFormData(this.initialArr, this.loanEnterpriseForm, next)
|
? next()
|
: "";
|
}
|
};
|
</script>
|