|
@@ -0,0 +1,223 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="risk-adiust">
|
|
|
|
+ <cy-info-title class="mb-[10px] mt-[10px]">风控调整</cy-info-title>
|
|
|
|
+ <el-form
|
|
|
|
+ ref="ruleFormRef"
|
|
|
|
+ :model="ruleForm"
|
|
|
|
+ :rules="rules"
|
|
|
|
+ label-position="top"
|
|
|
|
+ class="rule-form"
|
|
|
|
+ >
|
|
|
|
+ <el-form-item label="行业大类" prop="managementFeeRatio">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="ruleForm.managementFeeRatio"
|
|
|
|
+ placeholder="请输入行业大类"
|
|
|
|
+ :disabled="disabled"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="行业小类" prop="managementFeeRatio">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="ruleForm.managementFeeRatio"
|
|
|
|
+ placeholder="请输入行业小类"
|
|
|
|
+ :disabled="disabled"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="具体业务" prop="managementFeeRatio">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="ruleForm.managementFeeRatio"
|
|
|
|
+ placeholder="请输入具体业务"
|
|
|
|
+ :disabled="disabled"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script lang="ts" setup>
|
|
|
|
+ import { reactive, ref, watch } from 'vue'
|
|
|
|
+ import type { FormInstance, FormRules } from 'element-plus'
|
|
|
|
+ import { cloneDeep } from '@pureadmin/utils'
|
|
|
|
+ import { message } from '@/utils/message'
|
|
|
|
+ import { useDictStore } from '@/store/modules/dict'
|
|
|
|
+ import { codeChangeName } from '@utils'
|
|
|
|
+
|
|
|
|
+ useDictStore().getConstant([
|
|
|
|
+ 'productType',
|
|
|
|
+ 'payBackMethod',
|
|
|
|
+ 'assetType',
|
|
|
|
+ 'marginType',
|
|
|
|
+ 'productTypeDetail',
|
|
|
|
+ { type: 'capitalList', query: { keyword: '' } }
|
|
|
|
+ ])
|
|
|
|
+ const { constant } = useDictStore()
|
|
|
|
+
|
|
|
|
+ const props = withDefaults(
|
|
|
|
+ defineProps<{
|
|
|
|
+ detailsInfo: any
|
|
|
|
+ disabled: boolean
|
|
|
|
+ }>(),
|
|
|
|
+ {
|
|
|
|
+ detailsInfo: () => {},
|
|
|
|
+ disabled: false
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+
|
|
|
|
+ const ruleForm = ref({
|
|
|
|
+ payBackMethod: '',
|
|
|
|
+ managementFeeRatio: '',
|
|
|
|
+ financingRate: '',
|
|
|
|
+ deliveryAmount: '',
|
|
|
|
+ startDeliveryDate: '',
|
|
|
|
+ contractPlanExpiryDate: '',
|
|
|
|
+ planExpiryDate: '',
|
|
|
|
+ occupation: '',
|
|
|
|
+ risk: '',
|
|
|
|
+ businessType: '',
|
|
|
|
+ pool: '',
|
|
|
|
+ recourseRights: '',
|
|
|
|
+ disclosedUndisclosedFactoring: '',
|
|
|
|
+ positiveReverseFactoring: '',
|
|
|
|
+ productType: '',
|
|
|
|
+ productTypeDetail: '',
|
|
|
|
+ refinancingType: '',
|
|
|
|
+ bankExpiryDate: '',
|
|
|
|
+ estimateDeliveryDays: '',
|
|
|
|
+ actualDeliveryDays: '',
|
|
|
|
+ surplusPrincipal: '',
|
|
|
|
+ depositType: '',
|
|
|
|
+ depositAmount: '',
|
|
|
|
+ actualCollectionManagementFee: '',
|
|
|
|
+ actualCollectionInterest: '',
|
|
|
|
+ fundInstitutionName: '',
|
|
|
|
+ fundRefinancingInstitutionInfoId: '',
|
|
|
|
+ deliveryAmountStandard: '',
|
|
|
|
+ surplusPrincipalStandard: ''
|
|
|
|
+ })
|
|
|
|
+ const ruleFormRef = ref<FormInstance>()
|
|
|
|
+ const rules = reactive<FormRules>({
|
|
|
|
+ // payBackMethod: [
|
|
|
|
+ // { required: true, message: '请选择还款方式', trigger: 'change' }
|
|
|
|
+ // ],
|
|
|
|
+ // managementFeeRatio: [
|
|
|
|
+ // { required: true, message: '请输入管理费率', trigger: 'blur' }
|
|
|
|
+ // ],
|
|
|
|
+ // financingRate: [
|
|
|
|
+ // { required: true, message: '请输入利息率', trigger: 'blur' }
|
|
|
|
+ // ],
|
|
|
|
+ // deliveryAmount: [
|
|
|
|
+ // { required: true, message: '请输入投放金额', trigger: 'blur' }
|
|
|
|
+ // ],
|
|
|
|
+ // startDeliveryDate: [
|
|
|
|
+ // { required: true, message: '请选择开始投放日期', trigger: 'change' }
|
|
|
|
+ // ],
|
|
|
|
+ // contractPlanExpiryDate: [
|
|
|
|
+ // { required: true, message: '请选择合同计划到期日', trigger: 'change' }
|
|
|
|
+ // ],
|
|
|
|
+ // planExpiryDate: [
|
|
|
|
+ // { required: true, message: '请选择计划到期日', trigger: 'change' }
|
|
|
|
+ // ],
|
|
|
|
+ // occupation: [
|
|
|
|
+ // { required: true, message: '请选择资金占用', trigger: 'change' }
|
|
|
|
+ // ],
|
|
|
|
+ // risk: [
|
|
|
|
+ // { required: true, message: '请选择是否公司承险', trigger: 'change' }
|
|
|
|
+ // ],
|
|
|
|
+ // businessType: [
|
|
|
|
+ // { required: true, message: '请选择业务类型', trigger: 'change' }
|
|
|
|
+ // ],
|
|
|
|
+
|
|
|
|
+ // productType: [
|
|
|
|
+ // { required: true, message: '请选择产品名称', trigger: 'change' }
|
|
|
|
+ // ],
|
|
|
|
+ productTypeDetail: [
|
|
|
|
+ { required: true, message: '请输入产品名称详情', trigger: 'change' }
|
|
|
|
+ ],
|
|
|
|
+ // refinancingType: [
|
|
|
|
+ // { required: true, message: '请选择资产类别', trigger: 'change' }
|
|
|
|
+ // ],
|
|
|
|
+ // bankExpiryDate: [
|
|
|
|
+ // { required: true, message: '请选择银行到期日', trigger: 'change' }
|
|
|
|
+ // ],
|
|
|
|
+ // estimateDeliveryDays: [
|
|
|
|
+ // { required: true, message: '请输入预计投放天数', trigger: 'blur' }
|
|
|
|
+ // ],
|
|
|
|
+ // actualDeliveryDays: [
|
|
|
|
+ // { required: true, message: '请输入实际投放天数', trigger: 'blur' }
|
|
|
|
+ // ],
|
|
|
|
+ // surplusPrincipal: [
|
|
|
|
+ // { required: true, message: '请输入待还本金', trigger: 'blur' }
|
|
|
|
+ // ],
|
|
|
|
+ depositType: [
|
|
|
|
+ { required: true, message: '请选择保证金类别', trigger: 'change' }
|
|
|
|
+ ]
|
|
|
|
+ // depositAmount: [
|
|
|
|
+ // { required: true, message: '请输入保证金金额', trigger: 'blur' }
|
|
|
|
+ // ],
|
|
|
|
+ // actualCollectionManagementFee: [
|
|
|
|
+ // { required: true, message: '请输入实收管理费', trigger: 'blur' }
|
|
|
|
+ // ],
|
|
|
|
+ // actualCollectionInterest: [
|
|
|
|
+ // { required: true, message: '请输入实收利息', trigger: 'blur' }
|
|
|
|
+ // ],
|
|
|
|
+ // fundInstitutionName: [
|
|
|
|
+ // { required: true, message: '请选择资金出资方', trigger: 'blur' }
|
|
|
|
+ // ],
|
|
|
|
+ // deliveryAmountStandard: [
|
|
|
|
+ // { required: true, message: '请输入投放金额(本位币)', trigger: 'blur' }
|
|
|
|
+ // ],
|
|
|
|
+ // surplusPrincipalStandard: [
|
|
|
|
+ // { required: true, message: '请输入待还本金(本位币)', trigger: 'blur' }
|
|
|
|
+ // ]
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ watch(
|
|
|
|
+ () => props.detailsInfo,
|
|
|
|
+ (newV) => {
|
|
|
|
+ if (newV === undefined || !Object.keys(newV).length) return
|
|
|
|
+ const deepInfo = cloneDeep(newV)
|
|
|
|
+ for (const key in ruleForm.value) {
|
|
|
|
+ ruleForm.value[key] = deepInfo[key]
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ immediate: true,
|
|
|
|
+ deep: true
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ const assetInstitutionNameChange = (val) => {
|
|
|
|
+ const fundRefinancingInstitutionInfoId = codeChangeName(
|
|
|
|
+ constant.capitalList,
|
|
|
|
+ val,
|
|
|
|
+ 'institutionName',
|
|
|
|
+ 'id'
|
|
|
|
+ )
|
|
|
|
+ if (!fundRefinancingInstitutionInfoId) {
|
|
|
|
+ ruleForm.value.fundInstitutionName = ''
|
|
|
|
+ } else {
|
|
|
|
+ ruleForm.value.fundRefinancingInstitutionInfoId =
|
|
|
|
+ fundRefinancingInstitutionInfoId
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ const getParams = () => {
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
+ if (!ruleFormRef) return
|
|
|
|
+ ruleFormRef.value?.validate((valid, fields) => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ const { productTypeDetail, depositType } = ruleForm.value
|
|
|
|
+ const params = {
|
|
|
|
+ productTypeDetail,
|
|
|
|
+ depositType
|
|
|
|
+ }
|
|
|
|
+ resolve(params)
|
|
|
|
+ } else {
|
|
|
|
+ reject('error submit!')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ defineExpose({
|
|
|
|
+ getParams
|
|
|
|
+ })
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="scss" scoped></style>
|