<template>
|
<div class="apply">
|
<!-- <p>
|
<el-button size="small" type="primary" @click="dialogTableVisible = true">还款计划试算</el-button>
|
</p>-->
|
<div v-if="flowno == 'CreditFlowPublic'">
|
<FormInfo
|
:info="info"
|
v-if="borrowerHeader.length > 0"
|
:keys="borrowerHeader"
|
title="借款人信息"
|
:loading="loading"
|
></FormInfo>
|
|
<FormInfo :info="info" :keys="applyDetailInfo" title="基本信息" :loading="loading"></FormInfo>
|
|
<FormInfo
|
:info="info"
|
v-if="flowno != 'ZBDCreditFlow'"
|
:keys="applyDetailSpecialInfo"
|
title="产品个性化信息"
|
:loading="loading"
|
></FormInfo>
|
|
<FormInfo
|
v-if="ransomHeader.length > 0 && Object.keys(ransomInfo).length > 0"
|
:info="ransomInfo"
|
:keys="ransomHeader"
|
title="赎楼信息"
|
:loading="loading"
|
></FormInfo>
|
|
<FormInfo
|
v-if="ransomHeader.length > 0 && buildAcctHeader.length > 0 && Object.keys(buildAcctInfo).length > 0"
|
:info="buildAcctInfo"
|
:keys="buildAcctHeader"
|
title="财务信息"
|
:loading="loading"
|
></FormInfo>
|
|
<!-- 保理-财务信息 -->
|
<FormInfo
|
v-if="typeof info.payprincipalamt === 'object' && info.payprincipalamt.visible"
|
:info="info"
|
:keys="financeHeader"
|
title="财务信息"
|
:loading="loading"
|
></FormInfo>
|
|
<FormInfo
|
v-if="applyOrderInfo.length > 0 && Object.keys(orderInfo).length > 0"
|
:info="orderInfo"
|
:keys="applyOrderInfo"
|
title="订单信息"
|
:loading="loading"
|
></FormInfo>
|
|
<KeysTable
|
v-if="voucherHeader.length > 0"
|
:list="voucherInfo"
|
:header="voucherHeader"
|
:isShowPages="false"
|
title="凭证信息"
|
:loading="loading"
|
></KeysTable>
|
|
<FormInfo
|
:info="info"
|
:keys="baseAccountInfo"
|
v-if="Object.keys(accountInfo).length > 0"
|
title="账户信息"
|
:loading="loading"
|
></FormInfo>
|
|
<FormInfo
|
:info="info"
|
:keys="accountInfo"
|
v-if="Object.keys(accountInfo).length > 0"
|
title="保证金信息"
|
:loading="loading"
|
></FormInfo>
|
|
|
<KeysTable
|
v-if="info.creditorBills"
|
:list="info.creditorBills"
|
:header="creditorBillsHeader"
|
:isShowPages="false"
|
title="应收账款"
|
></KeysTable>
|
|
<FormInfo
|
v-if="bidProjectHeader.length > 0 && Object.keys(bidProjectInfo).length > 0"
|
:info="bidProjectInfo"
|
:keys="bidProjectHeader"
|
title="投标项目信息"
|
:loading="loading"
|
></FormInfo>
|
|
<FormInfo
|
v-if="putOutInfo && Object.keys(putOutInfo).length > 0"
|
:info="putOutInfo"
|
:keys="loanInfo"
|
title="放款信息"
|
:loading="loading"
|
></FormInfo>
|
|
<FormInfo
|
:info="pricingInfo"
|
:keys="pricingInfoKeys"
|
:discountAgreementFile="discountAgreementFile"
|
@downloadDiscountAgreement="downloadDiscountAgreement"
|
v-if="pricingInfoKeys.length > 0 && Object.keys(pricingInfo).length > 0"
|
title="定价信息"
|
:loading="loading"
|
></FormInfo>
|
</div>
|
|
<div v-if="flowno == 'CreditFlowCase' || flowno == 'CreditFlowCommon'">
|
<FormInfo :info="info" :keys="creditFlowCaseApplyDetailInfo" title="基本信息" :loading="loading"></FormInfo>
|
<FormInfo
|
:info="setKesInfo(info.earnestMoneyInfo)"
|
:keys="accountInfo2"
|
v-if="Object.keys(accountInfo2).length > 0 && info.earnestMoneyInfo && $route.query.productID.indexOf('OFF_') < 0"
|
title="保证金信息"
|
:loading="loading"
|
></FormInfo>
|
|
<FormInfo
|
:info="info"
|
:keys="accountInfo"
|
v-if="Object.keys(accountInfo).length > 0"
|
title="账户信息"
|
:loading="loading"
|
></FormInfo>
|
<FormInfo
|
v-if="putOutInfo && Object.keys(putOutInfo).length > 0"
|
:info="putOutInfo"
|
:keys="loanInfo"
|
title="放款信息"
|
:loading="loading"
|
></FormInfo>
|
|
<FormInfo
|
:info="pricingInfo"
|
:keys="pricingInfoKeys"
|
:discountAgreementFile="discountAgreementFile"
|
@downloadDiscountAgreement="downloadDiscountAgreement"
|
v-if="pricingInfoKeys.length > 0 && Object.keys(pricingInfo).length > 0"
|
title="定价信息"
|
:loading="loading"
|
></FormInfo>
|
</div>
|
<el-dialog
|
:visible.sync="dialogTableVisible"
|
custom-class="comm-dialog"
|
:modal-append-to-body="false"
|
>
|
<TrialRepaymentPlan :serialNo="serialNo"></TrialRepaymentPlan>
|
</el-dialog>
|
</div>
|
</template>
|
<script>
|
// 贷款申请信息
|
import {
|
qryApplyDetail,
|
downloadDiscountAgreement,
|
qryZBDAlterApplyDetail
|
} from "@comprehensive/serve/public";
|
import FormInfo from "../FormInfo";
|
import {
|
applyDetailInfo,
|
creditFlowCaseApplyDetailInfo,
|
baseAccountInfo,
|
applyOrderInfo,
|
pricingInfoKeys,
|
accountInfo,
|
accountInfo2,
|
loanInfo,
|
ransomHeader,
|
buildAcctHeader,
|
ZBDCreditFlowHeader,
|
bidProjectInfoHeader,
|
applyDetailBuildingInfo,
|
borrowerInfoHeader,
|
applyDetailSpecialInfo,
|
CreditFlowPublicHeader,
|
financeHeader,
|
CreditFlowPublicAccountInfo
|
} from "@comprehensive/utils/formHeaders";
|
import { voucherHeader } from "@comprehensive/utils/tableHeaders";
|
import KeysTable from "../KeysTable";
|
import TrialRepaymentPlan from "../TrialRepaymentPlan";
|
import { flownos } from "@comprehensive/utils/comm";
|
|
export default {
|
props: {
|
// 申请编号
|
serialNo: {
|
type: String,
|
required: true
|
},
|
objectType: {
|
type: String,
|
default: ""
|
},
|
customerID: {
|
type: String,
|
default: ""
|
},
|
alterobjectno: {
|
type: String,
|
default: ""
|
},
|
flowno: {
|
type: String,
|
|
// 默认为案场
|
default: "CreditFlowCase"
|
}
|
},
|
components: {
|
FormInfo,
|
KeysTable,
|
TrialRepaymentPlan
|
},
|
data() {
|
return {
|
info: {},
|
loading: false,
|
dialogTableVisible: false,
|
applyDetailInfo: [],
|
applyOrderInfo: [],
|
baseAccountInfo: [...baseAccountInfo],
|
voucherInfo: [],
|
pricingInfo: {}, // 定价信息
|
ransomInfo: {}, // 赎楼信息
|
buildAcctInfo: {}, // 财务信息
|
pricingInfoKeys: [],
|
accountInfo: [],
|
accountInfo2:[],
|
loanInfo: [],
|
ransomHeader: [], // 赎楼信息
|
buildAcctHeader: [],
|
financeHeader: [...financeHeader],
|
voucherHeader: [],
|
bidProjectHeader: [], // 招标贷-贷款申请信息-投标项目信息
|
borrowerHeader: [], // 借款人信息
|
applyDetailSpecialInfo: [...applyDetailSpecialInfo], // 贷款申请信息-产品个性化字段
|
putOutInfo: {},
|
orderInfo: {},
|
bidProjectInfo: {},
|
discountAgreementFile: {},
|
creditFlowCaseApplyDetailInfo: [...creditFlowCaseApplyDetailInfo],
|
// 案场排除字段
|
creditFlowCaseFilter: [
|
"applytype",
|
"enterprisename",
|
"enterprisename",
|
"buildingbusinesstype",
|
"enterpriseusablesum",
|
"maximummortgage",
|
"mortgageline",
|
"mortgageperiod",
|
"designfeetotalamt",
|
"monthavarageflow",
|
"entbusinessmodelDesc",
|
"customerbaseelementDesc",
|
"surplusamt",
|
"entlimitamount",
|
"actualputoutsum"
|
],
|
|
// 非案场排除字段
|
creditFlowCommonFilter: [
|
"applytype",
|
"maximummortgage",
|
"mortgageline",
|
"mortgageperiod",
|
"buildingbusinesstype",
|
"projectSum",
|
"actualputoutsum"
|
],
|
|
// 抵押排除字段
|
mortgageFlowFilter: [
|
// 'hopebusinesssum',
|
// 'hopebusinesstermmonth',
|
"occurtype",
|
"enterprisename",
|
"enterprisename",
|
"enterpriseusablesum",
|
"riskbasecreditamt",
|
"riskproductcreditamt",
|
"whiteadvisebaseamt",
|
"whiteexecbaseamt",
|
"whiteadviseproductamt",
|
"whiteexecproductamt",
|
"whiteQuotaValidDate",
|
"designfeetotalamt",
|
"monthavarageflow",
|
"entbusinessmodelDesc",
|
"customerbaseelementDesc",
|
"projectSum",
|
"whiteQuotaInvalidDate",
|
"entlimitamount",
|
"buildingbusinesstype",
|
"actualputoutsum"
|
],
|
|
// 招标贷排除字段
|
ZBDCreditFlowFilter: ["occurdate"],
|
|
// 保理-放款信息排除字段
|
CreditFlowPublicFilter: [
|
// "sysputoutstatus",
|
// "sysputoutfail",
|
"sysputoutchannl",
|
"manualputoutflag"
|
],
|
|
creditorBillsHeader: [
|
{ prop: "contractname", width: "auto", label: "基础合同名称" },
|
{ prop: "billname", width: "auto", label: "应收账款名称" },
|
{ prop: "billtypeDesc", width: "auto", label: "应收账款凭证类型" },
|
{ prop: "billno", width: "auto", label: "应收账款凭证编号" },
|
{ prop: "billsum", width: "auto", label: "应收账款金额", isMoney:true },
|
{ prop: "pjpamentendday", width: "auto", label: "应收账款到期日" },
|
{ prop: "remanentamt", width: "auto", label: "剩余额度", isMoney:true },
|
],
|
};
|
},
|
created() {
|
this.init();
|
},
|
methods: {
|
setKesInfo(value){
|
const obj = {}
|
if(value){
|
for (const key in value) {
|
obj[key] = {
|
value:value[key],
|
valueDesc:value[key],
|
visible:true
|
}
|
}
|
return obj
|
}else{
|
return {}
|
}
|
},
|
init() {
|
const {
|
flowno,
|
creditFlowCaseFilter,
|
creditFlowCommonFilter,
|
ZBDCreditFlowFilter,
|
mortgageFlowFilter,
|
CreditFlowPublicFilter
|
} = this;
|
|
const {
|
// 案场
|
CreditFlowCase,
|
|
// 非案场
|
CreditFlowCommon,
|
|
// 抵押
|
MortgageFlow,
|
|
// 赎楼/快贷
|
BuildingBusinessFlow,
|
|
// 招标贷
|
ZBDCreditFlow,
|
|
// 保理
|
CreditFlowPublic,
|
|
ZBDEntInfoAlterFlow
|
} = flownos;
|
|
let header = [];
|
let bidProjectHeader = [];
|
let pricingInfoHeader = [...pricingInfoKeys];
|
let loanInfoHeader = [...loanInfo];
|
|
if (flowno === CreditFlowCase) {
|
header = creditFlowCaseApplyDetailInfo
|
|
this.applyOrderInfo = [...applyOrderInfo];
|
this.voucherHeader = [...voucherHeader];
|
this.accountInfo = [...accountInfo];
|
this.accountInfo2 = [...accountInfo2]
|
}
|
|
if (flowno === CreditFlowCommon) {
|
header = applyDetailInfo.filter(
|
({ field }) => !creditFlowCommonFilter.includes(field)
|
);
|
this.accountInfo = [...accountInfo];
|
this.accountInfo2 = [...accountInfo2]
|
}
|
|
if (flowno === MortgageFlow) {
|
header = applyDetailInfo.filter(
|
({ field }) => !mortgageFlowFilter.includes(field)
|
);
|
this.accountInfo = [...accountInfo];
|
this.accountInfo2 = [...accountInfo2]
|
}
|
|
if (flowno === BuildingBusinessFlow) {
|
header = [...applyDetailBuildingInfo];
|
this.ransomHeader = [...ransomHeader];
|
this.buildAcctHeader = [...buildAcctHeader];
|
}
|
|
if (flowno === ZBDCreditFlow || flowno === ZBDEntInfoAlterFlow) {
|
header = ZBDCreditFlowHeader.filter(
|
({ field }) => !ZBDCreditFlowFilter.includes(field)
|
);
|
pricingInfoHeader = [];
|
bidProjectHeader = [...bidProjectInfoHeader];
|
}
|
|
if (flowno === CreditFlowPublic) {
|
header = [...CreditFlowPublicHeader];
|
this.accountInfo = [...CreditFlowPublicAccountInfo];
|
loanInfoHeader = loanInfoHeader.filter(
|
({ field }) => !CreditFlowPublicFilter.includes(field)
|
);
|
}
|
this.applyDetailInfo = [...header];
|
this.pricingInfoKeys = [...pricingInfoHeader];
|
this.bidProjectHeader = bidProjectHeader;
|
this.loanInfo = [...loanInfoHeader];
|
this.qryApplyDetail();
|
},
|
async downloadDiscountAgreement() {
|
await downloadDiscountAgreement({ serialNo: this.serialNo });
|
},
|
async qryApplyDetail() {
|
const { flowno, serialNo, objectType, alterobjectno } = this;
|
|
const {
|
// 案场
|
CreditFlowCase,
|
|
// 非案场
|
CreditFlowCommon,
|
|
// 赎楼/快贷
|
BuildingBusinessFlow,
|
|
// 招标贷
|
ZBDCreditFlow
|
} = flownos;
|
|
this.loading = true;
|
|
const res =
|
flowno == "ZBDEntInfoAlterFlow"
|
? await qryZBDAlterApplyDetail({ alterobjectno })
|
: await qryApplyDetail({
|
serialNo,
|
objectType
|
});
|
this.loading = false;
|
const { result } = res;
|
const {
|
voucherInfo = [],
|
pricingInfo = {},
|
putOutInfo = {},
|
ransomInfo = {},
|
buildAcctInfo = {},
|
orderInfo = {},
|
bidProjectInfo = {},
|
mergeCreditLoan = {},
|
occurtype = {},
|
businesssum = {},
|
...other
|
} = result;
|
if (
|
typeof other.productname === "object" &&
|
typeof other.productid === "object"
|
) {
|
other.productname.visible = other.productid.visible;
|
}
|
|
let businesssumInfo = {};
|
let occurValue = occurtype.value;
|
const getBusinessum = tempBusinesssum => {
|
// 赎楼
|
if (flowno === BuildingBusinessFlow) {
|
return {
|
businesssum_shulou: { ...tempBusinesssum },
|
businesssum: { visible: false, value: "", valueDesc: "" },
|
businesssum_shouxin: { visible: false, value: "", valueDesc: "" }
|
};
|
} else {
|
return {
|
businesssum_shulou: { visible: false, value: "", valueDesc: "" },
|
businesssum: { ...tempBusinesssum },
|
businesssum_shouxin: { visible: false, value: "", valueDesc: "" }
|
};
|
}
|
};
|
|
// 案场/非案场
|
if (flowno === CreditFlowCase || flowno === CreditFlowCommon) {
|
if (mergeCreditLoan.value === "0" && occurValue === "01") {
|
// 仅授信
|
businesssumInfo = {
|
businesssum_shulou: { visible: false, value: "", valueDesc: "" },
|
businesssum: { visible: false, value: "", valueDesc: "" },
|
businesssum_shouxin: { ...businesssum }
|
};
|
// 隐藏定价信息
|
this.pricingInfoKeys = [];
|
} else {
|
businesssumInfo = getBusinessum(businesssum);
|
}
|
|
// 分期、取现
|
if (occurValue === "02" || occurValue === "03") {
|
// 展示 借款人信息
|
this.borrowerHeader = [...borrowerInfoHeader];
|
}
|
} else {
|
businesssumInfo = getBusinessum(businesssum);
|
}
|
|
this.info = this.changeVisible(
|
{ ...other, mergeCreditLoan, occurtype, ...businesssumInfo },
|
[
|
{ field: "productname", visibleField: "productid" },
|
{ field: "creditorgname", visibleField: "creditorgid" },
|
{ field: "productdimensionname", visibleField: "productdimension" },
|
{ field: "fundunitname", visibleField: "fundunitno" },
|
// { field: "customerbasename", visibleField: "productcustomerscode" }
|
]
|
);
|
// 针对资方信息展示- 手续费率、手续费、手续费补贴 字段特殊处理,置为0
|
pricingInfo.poundagerate =pricingInfo.poundage = pricingInfo.poundagesubsidy= 0
|
this.info.businesstermday.value = this.info.businesstermday.value + '天'
|
console.log('qryApplyDetail Info',this.info)
|
this.voucherInfo = voucherInfo;
|
this.pricingInfo = pricingInfo;
|
|
this.putOutInfo = putOutInfo;
|
this.ransomInfo = ransomInfo;
|
this.buildAcctInfo = buildAcctInfo;
|
this.orderInfo = orderInfo;
|
this.bidProjectInfo = bidProjectInfo;
|
this.discountAgreementFile = result.discountAgreementFile;
|
},
|
changeVisible(info, arr) {
|
arr.forEach(({ field, visibleField }) => {
|
if (
|
typeof info[field] === "object" &&
|
typeof info[visibleField] === "object"
|
) {
|
info[field].visible = info[visibleField].visible;
|
}
|
});
|
return info;
|
}
|
},
|
watch: {
|
serialNo() {
|
this.init();
|
}
|
}
|
};
|
</script>
|
|
<style lang="postcss" scoped>
|
.apply {
|
& >>> .el-dialog__body {
|
padding-top: 10px;
|
}
|
& >>> .comm-dialog {
|
width: 1200px;
|
}
|
& >>> .hint-remark .input{
|
color: #f40;
|
font-weight: bold;
|
}
|
}
|
</style>
|