实现上虞利率定价字段调整

This commit is contained in:
wkc
2026-05-11 18:02:04 +08:00
parent a50b25e4ec
commit 6ef3cfcaea
17 changed files with 430 additions and 72 deletions

View File

@@ -64,7 +64,7 @@
<el-col :span="12">
<el-form-item label="业务种类" prop="businessType">
<el-select v-model="form.businessType" placeholder="请选择业务种类" style="width: 100%" @change="handleBusinessTypeChange">
<el-option label="新" value="新"/>
<el-option label="新" value="新"/>
<el-option label="存量新增" value="存量新增"/>
<el-option label="存量转贷" value="存量转贷"/>
</el-select>
@@ -107,6 +107,11 @@
<el-switch v-model="form.collThirdParty"/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="isCertificatePledge">
<el-form-item label="存单票面利率" prop="couponRate">
<el-input v-model="form.couponRate" placeholder="请输入存单票面利率"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<history-contract-selector
@@ -158,6 +163,14 @@ export default {
}
}
const validateCouponRate = (rule, value, callback) => {
if (this.isCertificatePledge && !value) {
callback(new Error('存单票面利率不能为空'))
return
}
callback()
}
// 贷款期限验证
const validateLoanTerm = (rule, value, callback) => {
if (!value && value !== 0) {
@@ -196,7 +209,8 @@ export default {
isGreenLoan: false,
isTradeBuildEnt: false,
collType: undefined,
collThirdParty: false
collThirdParty: false,
couponRate: undefined
},
rules: {
custIsn: [
@@ -230,6 +244,9 @@ export default {
],
collType: [
{required: true, message: "请选择抵质押类型", trigger: "change"}
],
couponRate: [
{validator: validateCouponRate, trigger: "blur"}
]
}
}
@@ -249,12 +266,15 @@ export default {
isStockTransfer() {
return this.form.businessType === '存量转贷'
},
isCertificatePledge() {
return this.form.guarType === '质押' && this.form.collType === '存单质押'
},
collateralTypeOptions() {
if (this.form.guarType === '抵押') {
return ['一类', '二类', '三类', '四类', '其他']
return ['一类', '二类', '三类', '四类', '排污权抵押', '设备等其他不动产抵押']
}
if (this.form.guarType === '质押') {
return ['存单质押', '其他']
return ['存单质押', '股权质押', '其他质押']
}
return []
}
@@ -269,6 +289,9 @@ export default {
if (val !== oldVal) {
this.resetCollateralFields()
}
},
'form.collType'() {
this.resetCouponRateIfNotCertificatePledge()
}
},
methods: {
@@ -289,7 +312,8 @@ export default {
isGreenLoan: false,
isTradeBuildEnt: false,
collType: undefined,
collThirdParty: false
collThirdParty: false,
couponRate: undefined
}
this.submitting = false
this.showHistorySelector = false
@@ -315,12 +339,23 @@ export default {
resetCollateralFields() {
this.form.collType = undefined
this.form.collThirdParty = false
this.resetCouponRateIfNotCertificatePledge()
this.$nextTick(() => {
if (this.$refs.form) {
this.$refs.form.clearValidate(['collType', 'collThirdParty'])
this.$refs.form.clearValidate(['collType', 'collThirdParty', 'couponRate'])
}
})
},
resetCouponRateIfNotCertificatePledge() {
if (!this.isCertificatePledge) {
this.form.couponRate = undefined
this.$nextTick(() => {
if (this.$refs.form) {
this.$refs.form.clearValidate(['couponRate'])
}
})
}
},
handleBusinessTypeChange(value) {
this.clearHistoryContract()
if (value === '存量转贷') {
@@ -370,6 +405,10 @@ export default {
this.$modal.msgWarning("请选择历史贷款合同")
return
}
if (this.isCertificatePledge && !this.form.couponRate) {
this.$modal.msgWarning("存单票面利率不能为空")
return
}
this.submitting = true
// 转换开关值为字符串
const data = {
@@ -386,6 +425,9 @@ export default {
if (!this.isStockTransfer) {
delete data.loanRateHistory
}
if (!this.isCertificatePledge) {
delete data.couponRate
}
createCorporateWorkflow(data).then(response => {
this.$modal.msgSuccess("新增成功")

View File

@@ -52,14 +52,6 @@
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="贷款用途" prop="loanPurpose">
<el-select v-model="form.loanPurpose" placeholder="请选择贷款用途" style="width: 100%">
<el-option label="消费" value="consumer"/>
<el-option label="经营" value="business"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="借款期限(年)" prop="loanTerm">
<el-select v-model="form.loanTerm" placeholder="请选择借款期限" style="width: 100%">
@@ -72,7 +64,7 @@
<el-col :span="12">
<el-form-item label="业务种类" prop="businessType">
<el-select v-model="form.businessType" placeholder="请选择业务种类" style="width: 100%" @change="handleBusinessTypeChange">
<el-option label="新" value="新"/>
<el-option label="新" value="新"/>
<el-option label="存量新增" value="存量新增"/>
<el-option label="存量转贷" value="存量转贷"/>
</el-select>
@@ -85,11 +77,6 @@
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="是否有经营佐证" prop="bizProof">
<el-switch v-model="form.bizProof"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="循环功能" prop="loanLoop">
<el-switch v-model="form.loanLoop"/>
@@ -112,6 +99,11 @@
<el-switch v-model="form.collThirdParty"/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="isCertificatePledge">
<el-form-item label="存单票面利率" prop="couponRate">
<el-input v-model="form.couponRate" placeholder="请输入存单票面利率"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<history-contract-selector
@@ -163,6 +155,14 @@ export default {
}
}
const validateCouponRate = (rule, value, callback) => {
if (this.isCertificatePledge && !value) {
callback(new Error('存单票面利率不能为空'))
return
}
callback()
}
return {
loanTermOptions: [
'1', '2', '3', '4', '5', '6'
@@ -181,14 +181,13 @@ export default {
idNum: this.customerMap ? (this.customerMap.cust_id || '').substring(3) : undefined,
guarType: undefined,
applyAmt: undefined,
loanPurpose: undefined,
loanTerm: undefined,
businessType: undefined,
loanRateHistory: undefined,
bizProof: false,
loanLoop: false,
collType: undefined,
collThirdParty: false
collThirdParty: false,
couponRate: undefined
},
rules: {
custIsn: [
@@ -211,9 +210,6 @@ export default {
applyAmt: [
{required: true, validator: validateApplyAmt, trigger: "blur"}
],
loanPurpose: [
{required: true, message: "请选择贷款用途", trigger: "change"}
],
loanTerm: [
{required: true, message: "请选择借款期限", trigger: "change"}
],
@@ -222,6 +218,12 @@ export default {
],
loanRateHistory: [
{required: true, message: "请选择历史贷款合同", trigger: "change"}
],
collType: [
{required: true, message: "请选择抵质押类型", trigger: "change"}
],
couponRate: [
{validator: validateCouponRate, trigger: "blur"}
]
}
}
@@ -241,12 +243,15 @@ export default {
isStockTransfer() {
return this.form.businessType === '存量转贷'
},
isCertificatePledge() {
return this.form.guarType === '质押' && this.form.collType === '存单质押'
},
collateralTypeOptions() {
if (this.form.guarType === '抵押') {
return ['一类', '二类', '三类', '四类', '其他']
return ['一线', '一类', '二类', '三类']
}
if (this.form.guarType === '质押') {
return ['存单质押', '其他']
return ['存单质押', '其他质押']
}
return []
}
@@ -261,6 +266,9 @@ export default {
if (val !== oldVal) {
this.resetCollateralFields()
}
},
'form.collType'() {
this.resetCouponRateIfNotCertificatePledge()
}
},
methods: {
@@ -275,14 +283,13 @@ export default {
idNum: this.customerMap ? (this.customerMap.cust_id || '').substring(3) : undefined,
guarType: undefined,
applyAmt: undefined,
loanPurpose: undefined,
loanTerm: undefined,
businessType: undefined,
loanRateHistory: undefined,
bizProof: false,
loanLoop: false,
collType: undefined,
collThirdParty: false
collThirdParty: false,
couponRate: undefined
}
this.submitting = false
this.showHistorySelector = false
@@ -308,12 +315,23 @@ export default {
resetCollateralFields() {
this.form.collType = undefined
this.form.collThirdParty = false
this.resetCouponRateIfNotCertificatePledge()
this.$nextTick(() => {
if (this.$refs.form) {
this.$refs.form.clearValidate(['collType', 'collThirdParty'])
this.$refs.form.clearValidate(['collType', 'collThirdParty', 'couponRate'])
}
})
},
resetCouponRateIfNotCertificatePledge() {
if (!this.isCertificatePledge) {
this.form.couponRate = undefined
this.$nextTick(() => {
if (this.$refs.form) {
this.$refs.form.clearValidate(['couponRate'])
}
})
}
},
handleBusinessTypeChange(value) {
this.clearHistoryContract()
if (value === '存量转贷') {
@@ -363,11 +381,14 @@ export default {
this.$modal.msgWarning("请选择历史贷款合同")
return
}
if (this.isCertificatePledge && !this.form.couponRate) {
this.$modal.msgWarning("存单票面利率不能为空")
return
}
this.submitting = true
// 转换开关值为字符串
const data = {
...this.form,
bizProof: this.form.bizProof ? '1' : '0',
loanLoop: this.form.loanLoop ? '1' : '0'
}
if (this.isCollateralGuarantee) {
@@ -379,6 +400,9 @@ export default {
if (!this.isStockTransfer) {
delete data.loanRateHistory
}
if (!this.isCertificatePledge) {
delete data.couponRate
}
createPersonalWorkflow(data).then(response => {
this.$modal.msgSuccess("新增成功")