Split model URLs for personal and corporate clients

This commit is contained in:
wkc
2026-04-27 15:22:08 +08:00
parent 5a80653917
commit 571f7bc075
20 changed files with 393 additions and 158 deletions

View File

@@ -59,14 +59,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="还款方式" prop="repayMethod">
<el-select v-model="form.repayMethod" placeholder="请选择还款方式" style="width: 100%">
<el-option label="分期" value="分期"/>
<el-option label="不分期" value="不分期"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<!-- 企业标识 -->
@@ -85,20 +77,17 @@
</el-row>
<!-- 抵质押信息 -->
<el-divider content-position="left">抵质押信息</el-divider>
<el-row>
<el-divider v-if="isCollateralGuarantee" content-position="left">抵质押信息</el-divider>
<el-row v-if="isCollateralGuarantee">
<el-col :span="12">
<el-form-item label="抵质押类型" prop="collType">
<el-select v-model="form.collType" placeholder="请选择抵质押类型" style="width: 100%">
<el-option label="一类" value="一类"/>
<el-option label="二类" value="二类"/>
<el-option label="三类" value="三类"/>
<el-option label="四类" value="四类"/>
<el-option v-for="item in collateralTypeOptions" :key="item" :label="item" :value="item"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="抵质押物三方所有" prop="collThirdParty">
<el-form-item label="抵质押物是否第三方所有" prop="collThirdParty">
<el-switch v-model="form.collThirdParty"/>
</el-form-item>
</el-col>
@@ -168,7 +157,6 @@ export default {
guarType: undefined,
applyAmt: undefined,
loanTerm: undefined,
repayMethod: undefined,
isGreenLoan: false,
isTradeBuildEnt: false,
collType: undefined,
@@ -198,9 +186,6 @@ export default {
loanTerm: [
{required: true, validator: validateLoanTerm, trigger: "change"}
],
repayMethod: [
{required: true, message: "请选择还款方式", trigger: "change"}
],
collType: [
{required: true, message: "请选择抵质押类型", trigger: "change"}
]
@@ -215,6 +200,18 @@ export default {
set(val) {
this.$emit('update:visible', val)
}
},
isCollateralGuarantee() {
return this.form.guarType === '抵押' || this.form.guarType === '质押'
},
collateralTypeOptions() {
if (this.form.guarType === '抵押') {
return ['一类', '二类', '三类', '四类', '其他']
}
if (this.form.guarType === '质押') {
return ['存单质押', '其他']
}
return []
}
},
watch: {
@@ -222,6 +219,11 @@ export default {
if (val) {
this.reset()
}
},
'form.guarType'(val, oldVal) {
if (val !== oldVal) {
this.resetCollateralFields()
}
}
},
methods: {
@@ -237,7 +239,6 @@ export default {
guarType: undefined,
applyAmt: undefined,
loanTerm: undefined,
repayMethod: undefined,
isGreenLoan: false,
isTradeBuildEnt: false,
collType: undefined,
@@ -255,6 +256,16 @@ export default {
this.dialogVisible = false
this.reset()
},
/** 清空抵质押字段 */
resetCollateralFields() {
this.form.collType = undefined
this.form.collThirdParty = false
this.$nextTick(() => {
if (this.$refs.form) {
this.$refs.form.clearValidate(['collType', 'collThirdParty'])
}
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
@@ -264,8 +275,13 @@ export default {
const data = {
...this.form,
isGreenLoan: this.form.isGreenLoan ? '1' : '0',
isTradeBuildEnt: this.form.isTradeBuildEnt ? '1' : '0',
collThirdParty: this.form.collThirdParty ? '1' : '0'
isTradeBuildEnt: this.form.isTradeBuildEnt ? '1' : '0'
}
if (this.isCollateralGuarantee) {
data.collThirdParty = this.form.collThirdParty ? '1' : '0'
} else {
delete data.collType
delete data.collThirdParty
}
createCorporateWorkflow(data).then(response => {

View File

@@ -80,7 +80,6 @@
<el-descriptions :column="2" border>
<el-descriptions-item label="担保方式">{{ detailData.guarType }}</el-descriptions-item>
<el-descriptions-item label="申请金额">{{ detailData.applyAmt }} </el-descriptions-item>
<el-descriptions-item label="还款方式">{{ detailData.repayMethod || '-' }}</el-descriptions-item>
<el-descriptions-item label="绿色贷款">{{ formatBoolean(detailData.isGreenLoan) }}</el-descriptions-item>
<el-descriptions-item label="贸易和建筑业企业">{{ formatBoolean(detailData.isTradeBuildEnt) }}</el-descriptions-item>
<el-descriptions-item label="抵质押类型">{{ detailData.collType || '-' }}</el-descriptions-item>

View File

@@ -182,7 +182,6 @@
<div class="output-section">
<h4 class="section-title">贷款特征</h4>
<el-descriptions :column="2" border size="small">
<el-descriptions-item label="还款方式">{{ corpOutput.repayMethod || '-' }}</el-descriptions-item>
<el-descriptions-item label="借款期限">{{ corpOutput.loanTerm || '-' }}</el-descriptions-item>
<el-descriptions-item label="BP_贷款期限"><span class="bp-value">{{ corpOutput.bpLoanTerm || '-' }}</span></el-descriptions-item>
<el-descriptions-item label="申请金额">{{ corpOutput.applyAmt || '-' }}</el-descriptions-item>

View File

@@ -82,19 +82,17 @@
</el-row>
<!-- 抵质押信息 -->
<el-divider content-position="left">抵质押信息</el-divider>
<el-row>
<el-divider v-if="isCollateralGuarantee" content-position="left">抵质押信息</el-divider>
<el-row v-if="isCollateralGuarantee">
<el-col :span="12">
<el-form-item label="抵质押类型" prop="collType">
<el-select v-model="form.collType" placeholder="请选择抵质押类型" style="width: 100%">
<el-option label="一类" value="一类"/>
<el-option label="二类" value="二类"/>
<el-option label="三类" value="三类"/>
<el-option v-for="item in collateralTypeOptions" :key="item" :label="item" :value="item"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="抵质押物三方所有" prop="collThirdParty">
<el-form-item label="抵质押物是否第三方所有" prop="collThirdParty">
<el-switch v-model="form.collThirdParty"/>
</el-form-item>
</el-col>
@@ -194,6 +192,18 @@ export default {
set(val) {
this.$emit('update:visible', val)
}
},
isCollateralGuarantee() {
return this.form.guarType === '抵押' || this.form.guarType === '质押'
},
collateralTypeOptions() {
if (this.form.guarType === '抵押') {
return ['一类', '二类', '三类', '四类', '其他']
}
if (this.form.guarType === '质押') {
return ['存单质押', '其他']
}
return []
}
},
watch: {
@@ -201,6 +211,11 @@ export default {
if (val) {
this.reset()
}
},
'form.guarType'(val, oldVal) {
if (val !== oldVal) {
this.resetCollateralFields()
}
}
},
methods: {
@@ -234,6 +249,16 @@ export default {
this.dialogVisible = false
this.reset()
},
/** 清空抵质押字段 */
resetCollateralFields() {
this.form.collType = undefined
this.form.collThirdParty = false
this.$nextTick(() => {
if (this.$refs.form) {
this.$refs.form.clearValidate(['collType', 'collThirdParty'])
}
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
@@ -243,8 +268,13 @@ export default {
const data = {
...this.form,
bizProof: this.form.bizProof ? '1' : '0',
loanLoop: this.form.loanLoop ? '1' : '0',
collThirdParty: this.form.collThirdParty ? '1' : '0'
loanLoop: this.form.loanLoop ? '1' : '0'
}
if (this.isCollateralGuarantee) {
data.collThirdParty = this.form.collThirdParty ? '1' : '0'
} else {
delete data.collType
delete data.collThirdParty
}
createPersonalWorkflow(data).then(response => {