模型高度自适应,个人银行产品新增修改

V0.1
yujialong 9 months ago
parent 8662dbcbcc
commit 80f49ab21e
  1. 1
      src/api/judgment.ts
  2. 12
      src/styles/form.scss
  3. 103
      src/views/product/bank/Add.vue
  4. 4
      src/views/product/bank/Config.vue
  5. 16
      src/views/product/fund/Add.vue
  6. 22
      src/views/product/strategy/150.vue
  7. 4
      src/views/product/strategy/151.vue
  8. 9
      src/views/product/strategy/152.vue
  9. 12
      src/views/product/strategy/153.vue
  10. 3
      src/views/product/strategy/154.vue
  11. 3
      src/views/product/strategy/155.vue
  12. 3
      src/views/product/strategy/156.vue
  13. 2
      src/views/product/strategy/Credit.vue

@ -14,3 +14,4 @@ export const deleteCache = async (data: Record<string, any>): Promise<any> =>
)
).data;
export const getOperation = async (params?: Record<string, any>): Promise<any> => (await axios.get('/product/product/bank/operation/getOperation', { params })).data;
export const queryCache = async (params?: Record<string, any>): Promise<any> => (await axios.get('/product/product/bank/operation/queryCache', { params })).data;

@ -53,6 +53,18 @@
@apply ml-2.5 text-sm text-[#333];
}
}
.radio-wrap {
@apply flex items-center;
.label {
@apply mr-10;
}
.whether {
@apply mr-5 text-xs text-[#666];
}
.el-radio {
margin-right: 15px;
}
}
}
.submit {
@apply py-[15px] px-[22px] mt-5 text-sm leading-none text-white bg-[#006bff] rounded-xl cursor-pointer;

@ -77,10 +77,17 @@
<template v-else>
<p class="field-name">选择本产品的贷款对象</p>
<div class="flex items-center mb-2">
<el-checkbox class="mt-1"
v-model="form.age"
label="年龄" />
<div v-if="form.age"
<div class="radio-wrap">
<span class="label">1年龄</span>
<span class="whether">是否启用</span>
<el-radio-group v-model="form.age">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
<div v-if="form.age === 795"
class="num-inputs ml-7">
<el-input placeholder="最小年龄"
v-model.number="form.minimumAge"></el-input>
@ -89,31 +96,55 @@
v-model.number="form.maximumAge"></el-input>
</div>
</div>
<div class="flex items-center mb-2">
<el-checkbox v-model="form.edu"
label="学历要求"></el-checkbox>
<el-checkbox-group v-if="form.edu"
<div class="flex items-center h-[47px] mb-2">
<div class="radio-wrap">
<span class="label">2学历要求</span>
<span class="whether">是否启用</span>
<el-radio-group v-model="form.edu">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
<el-checkbox-group v-if="form.edu === 795"
class="mt-2 ml-5"
v-model="form.educationalRequirements">
<el-checkbox v-for="(item, i) in config.find((e) => e.name === '个人产品-贷款对象')?.recordChildren[1]?.subject?.itemList"
<el-checkbox v-for="(item, i) in config.find((e) => e.name === '个人产品-贷款对象')?.recordChildren[1]?.recordChildren[1]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</div>
<div class="flex items-center mb-2">
<el-checkbox v-model="form.curWL"
label="工作年限"></el-checkbox>
<el-checkbox-group v-if="form.curWL"
<div class="flex items-center h-[47px] mb-2">
<div class="radio-wrap">
<span class="label">3工作年限</span>
<span class="whether">是否启用</span>
<el-radio-group v-model="form.curWL">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
<el-checkbox-group v-if="form.curWL === 795"
class="mt-2 ml-5"
v-model="form.currentWorkingLife">
<el-checkbox v-for="(item, i) in config.find((e) => e.name === '个人产品-贷款对象')?.recordChildren[2]?.subject?.itemList"
<el-checkbox v-for="(item, i) in config.find((e) => e.name === '个人产品-贷款对象')?.recordChildren[2]?.recordChildren[1]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</div>
<el-checkbox v-model="form.providentFundAndSocialSecurity"
label="公积金/社保"></el-checkbox>
<div class="radio-wrap">
<span class="label">4公积金/社保</span>
<span class="whether">是否启用</span>
<el-radio-group v-model="form.providentFundAndSocialSecurity">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
</template>
</div>
</el-form-item>
@ -289,6 +320,7 @@ interface RuleForm {
productCurrency: number;
bankGuaranteeTypeIds: any[];
currentWorkingLife?: any;
edu: number | string;
educationalRequirements?: any;
loanCeiling: any;
loanPurpose: any;
@ -296,7 +328,8 @@ interface RuleForm {
maximumAge: any;
maximumAnnualInterestRate: any;
maximumTermOfLoan: any;
age: boolean;
age: number | string;
curWL: number | string;
minimumAge: any;
minimumAprOnLoan: any;
minimumLoan: any;
@ -305,7 +338,7 @@ interface RuleForm {
otherPurposesOfLoan: string;
productObject: any;
productType: number;
providentFundAndSocialSecurity: any;
providentFundAndSocialSecurity: number | string;
whetherToSupportEarlyRepayment?: any;
}
@ -317,6 +350,16 @@ const levelId = +Cookies.get('sand-level');
const curTab = ref<string>('tab1');
const config = ref<any[]>([]);
const info = ref<Record<string, any>>(null);
const whethers = ref<Record<string, any>>([
{
id: 795,
name: '是',
},
{
id: 796,
name: '否',
},
]);
const formRef = ref<FormInstance>();
const userName = ref<string>();
const form = reactive<RuleForm>({
@ -327,6 +370,7 @@ const form = reactive<RuleForm>({
productCurrency: 1,
bankGuaranteeTypeIds: [],
currentWorkingLife: [],
edu: '',
educationalRequirements: [],
loanCeiling: '',
loanPurpose: '',
@ -334,7 +378,8 @@ const form = reactive<RuleForm>({
maximumAge: '',
maximumAnnualInterestRate: '',
maximumTermOfLoan: '',
age: false,
age: '',
curWL: '',
minimumAge: '',
minimumAprOnLoan: '',
minimumLoan: '',
@ -343,7 +388,7 @@ const form = reactive<RuleForm>({
otherPurposesOfLoan: '',
productObject: '',
productType: computed(() => +route.query.type),
providentFundAndSocialSecurity: false,
providentFundAndSocialSecurity: '',
whetherToSupportEarlyRepayment: false,
});
const rules = reactive<FormRules<RuleForm>>({
@ -400,7 +445,7 @@ const submit = async (formEl: FormInstance | undefined) => {
if (param.productType) {
if (!param.productObject) return ElMessage.error('请选择企业类型');
}
if ((!param.productType && param.age) || param.productType) {
if ((!param.productType && param.age === 795) || param.productType) {
if (!param.minimumAge) return ElMessage.error('请输入最小年龄');
if (!param.maximumAge) return ElMessage.error('请输入最大年龄');
if (isIllegalNum(param.minimumAge) || isIllegalNum(param.maximumAge)) return ElMessage.error('请输入合理的年龄');
@ -409,9 +454,9 @@ const submit = async (formEl: FormInstance | undefined) => {
//
if (!param.productType) {
if (param.edu && !param.educationalRequirements.length) return ElMessage.error('请选择学历要求');
if (param.curWL && !param.currentWorkingLife.length) return ElMessage.error('请选择工作年限');
if (param.curWL && !param.currentWorkingLife.length) return ElMessage.error('请选择工作年限');
if (param.edu === 795 && !param.educationalRequirements.length) return ElMessage.error('请选择学历要求');
if (param.curWL === 795 && !param.currentWorkingLife.length) return ElMessage.error('请选择工作年限');
if (param.curWL === 795 && !param.currentWorkingLife.length) return ElMessage.error('请选择工作年限');
}
if (isIllegalNum(param.minimumLoan) || isIllegalNum(param.loanCeiling) || +param.minimumLoan > +param.loanCeiling) return ElMessage.error('请输入合理的贷款额度');
if (isIllegalNum(param.minimumAprOnLoan) || isIllegalNum(param.maximumAnnualInterestRate) || +param.minimumAprOnLoan > +param.maximumAnnualInterestRate)
@ -421,7 +466,7 @@ const submit = async (formEl: FormInstance | undefined) => {
param.currentWorkingLife = param.currentWorkingLife.join();
param.educationalRequirements = param.educationalRequirements.join();
param.modeRepayment = param.modeRepayment.join();
param.providentFundAndSocialSecurity = param.providentFundAndSocialSecurity ? 1 : '';
param.providentFundAndSocialSecurity = param.providentFundAndSocialSecurity === 795 ? 1 : '';
param.whetherToSupportEarlyRepayment = param.whetherToSupportEarlyRepayment ? 58 : '';
//
param.addBankProductsGuarantyStyleReqList = [];
@ -472,10 +517,10 @@ const addRecord = async (data: Record<string, any>) => {
);
} else {
//
data.age && lcRule.push(handleId(100, 41, data.minimumAge + '~' + data.maximumAge + '', preIds + ',51,100', 5));
data.edu && lcRule.push(handleId(101, 42, data.educationalRequirements, preIds + ',51,101', 1));
data.curWL && lcRule.push(handleId(102, 43, data.currentWorkingLife, preIds + ',51,102', 1));
data.providentFundAndSocialSecurity && lcRule.push(handleId(103, '', '', preIds + ',51,103', '')); //
data.age === 795 && lcRule.push(handleId(100, 41, data.minimumAge + '~' + data.maximumAge + '', preIds + ',51,100', 5));
data.edu === 795 && lcRule.push(handleId(101, 42, data.educationalRequirements, preIds + ',51,101', 1));
data.curWL === 795 && lcRule.push(handleId(102, 43, data.currentWorkingLife, preIds + ',51,102', 1));
data.providentFundAndSocialSecurity === 795 && lcRule.push(handleId(103, '', '', preIds + ',51,103', '')); //
lcRule.push(
data.loanPurpose === 107 ? handleId(107, 11, data.otherPurposesOfLoan, preIds + ',52,107', 3) : handleId(data.loanPurpose, '', '', preIds + ',52,' + data.loanPurpose, ''),

@ -407,7 +407,7 @@ const form = reactive<RuleForm>({
collateral: [],
contractMaterials: '',
corporateCreditScoringStrategiesCheck: false,
corporateCreditScoringStrategies: '',
corporateCreditScoringStrategies: '',
corporateInterestRateModel: [],
dueDiligenceContent: [],
dueDiligenceMode: '',
@ -423,7 +423,7 @@ const form = reactive<RuleForm>({
materialsForLoanApproval: [],
mortgageContract: '',
personalCreditScoringStrategiesCheck: false,
personalCreditScoringStrategies: '',
personalCreditScoringStrategies: '',
pledgeContractCheck: false,
pledgeContract: '',
reviewApproveContent: '',

@ -336,7 +336,7 @@ const form = reactive({
checkPointId: levelId,
projectId,
buyingDuration: '',
buyingUnit: '',
buyingUnit: '',
fundName: '',
fundType: '',
fundraisingScale: '',
@ -345,7 +345,7 @@ const form = reactive({
operatingSalesServiceRates: '',
operationManagementRate: '',
sellingTime: '',
soldUnit: '',
soldUnit: '',
buySellRatioList0: [
{
input1: '0',
@ -367,18 +367,18 @@ const form = reactive({
input1: '0',
input2: '',
rate: '',
rateUnit: '%',
soldUnit1: '分钟',
soldUnit2: '分钟',
rateUnit: '',
soldUnit1: '',
soldUnit2: '',
type: 1,
},
{
input1: '',
input2: '',
rate: '',
rateUnit: '%',
soldUnit1: '分钟',
soldUnit2: '分钟',
rateUnit: '',
soldUnit1: '',
soldUnit2: '',
type: 1,
},
],

@ -3,7 +3,7 @@
<div class="c-auto">
<el-table class="c-table"
:data="form"
:max-height="height"
max-height="calc(100vh - 230px)"
:cell-style="{background:'#fff'}"
:span-method="span"
border>
@ -62,6 +62,7 @@
</el-select>
</div>
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num"></el-input>
<span class="ml-2 whitespace-nowrap">,</span>
<el-select class="w-[80px] ml-2"
@ -76,7 +77,7 @@
</template>
</el-table-column>
<el-table-column label="本人命中进黑名单"
min-width="120"
min-width="100"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.personalHitBlacklist"
@ -84,7 +85,7 @@
</template>
</el-table-column>
<el-table-column label="配偶命中拒入"
min-width="120"
min-width="100"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.mateHitRejected"
@ -92,7 +93,7 @@
</template>
</el-table-column>
<el-table-column label="父母/子女命中拒入"
min-width="120"
min-width="100"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.parentsHitRejected"
@ -100,7 +101,7 @@
</template>
</el-table-column>
<el-table-column label="其他家庭成员命中拒入"
min-width="120"
min-width="100"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.otherFamilyMembersHitRejected"
@ -108,21 +109,13 @@
</template>
</el-table-column>
<el-table-column label="企业大股东命中拒入"
min-width="120"
min-width="100"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.corporateMajorityHitRejected"
@change="e => checkRow(e, row)"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="本人及亲属企业命中准入"
min-width="120"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.hitAccess"
@change="checkNone(row)"></el-checkbox>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex justify-end">
@ -147,7 +140,6 @@ const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const form = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]);
const height = window.innerHeight - 230;
const symbols: Array<Record<string, any>> = [
{
name: '>=',

@ -3,11 +3,10 @@
<el-table class="c-table"
:data="form"
:cell-style="{background:'#fff'}"
:max-height="height"
max-height="calc(100vh - 230px)"
border>
<el-table-column prop="name"
label="进入黑名单指标"
fixed
min-width="220"
align="center">
</el-table-column>
@ -120,7 +119,6 @@ const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const form = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]);
const height = window.innerHeight - 230;
const symbols: Array<Record<string, any>> = [
{
name: '>=',

@ -2,7 +2,7 @@
<!-- 商采 -->
<el-table class="c-table"
:data="form"
:max-height="height"
max-height="calc(100vh - 230px)"
:cell-style="{background:'#fff'}"
:span-method="span"
border>
@ -180,7 +180,6 @@ const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const form = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]);
const height = window.innerHeight - 230;
const spanRows = [1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27];
const symbols: Array<Record<string, any>> = [
{
@ -249,7 +248,7 @@ const getConfig = async () => {
stRecordId: e.id,
ruleId: e?.recordChildren[0].id,
rule: e?.recordChildren[0].name,
symbol: e.id === 322 && cur ? cur?.ruleOne : (e.id === 318 || e.id === 320) && cur ? symbol : !i || i === 2 ? '' : e.id === 322 ? '' : '',
symbol: e.id === 322 && cur ? cur?.ruleOne : (e.id === 318 || e.id === 320) && cur ? symbol : !i || i === 2 ? '' : e.id === 322 ? '' : '',
symbol1: '>=',
num,
num1: '',
@ -280,7 +279,7 @@ const getConfig = async () => {
if (n.id === 339) {
temp.num = getNum(cur?.ruleTwo);
const unit = cur?.ruleTwo.match(/[年月日]+/g);
temp.symbol = unit ? unit[0] : '';
temp.symbol = unit ? unit[0] : '';
temp.symbol1 = getSymbol(cur?.ruleTwo) ?? '>=';
const arr = cur?.ruleTwo?.split(',') ?? [];
@ -288,7 +287,7 @@ const getConfig = async () => {
temp.had = getChinese(arr[2]);
}
if (e.id === 322) temp.symbol = '';
if (e.id === 322) temp.symbol = '';
//
if (n.id === 342) {
temp.symbol = cur?.ruleOne;

@ -2,18 +2,17 @@
<!-- 行内 -->
<el-table class="c-table"
:data="form"
:max-height="height"
max-height="calc(100vh - 230px)"
:cell-style="{background:'#fff'}"
:span-method="span"
border>
<el-table-column prop="name"
label="五级分类"
fixed
min-width="150"
min-width="100"
align="center">
</el-table-column>
<el-table-column label="未结清是否进黑名单"
min-width="170"
min-width="100"
align="center">
<template #default="{ row, $index }">
<span v-if="$index == 4">不存在未结清情况</span>
@ -22,7 +21,7 @@
</template>
</el-table-column>
<el-table-column label="进入黑名单规则"
width="320"
width="330"
align="center">
<template #default="{ row }">
<div class="flex items-center">
@ -58,7 +57,7 @@
</template>
</el-table-column>
<el-table-column label="结清是否能出黑名单"
min-width="170"
min-width="120"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.outBlacklist"></el-checkbox>
@ -143,7 +142,6 @@ const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const form = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]);
const height = window.innerHeight - 230;
const nums: Array<number> = [1, 3, 5, 10, 20, 30, 40];
const units: Array<string> = ['年', '个月', '天'];
//

@ -2,7 +2,7 @@
<!-- 企业 -->
<el-table class="c-table"
:data="form"
:max-height="height"
max-height="calc(100vh - 230px)"
:cell-style="{background:'#fff'}"
border>
<el-table-column prop="name"
@ -294,7 +294,6 @@ const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const form = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]);
const height = window.innerHeight - 230;
const symbols: Array<string> = ['>=', '<', '>', '==', '<='];
const nums: Array<number> = [1, 3, 5, 6, 16, 33, 40];
const units: Array<string> = ['年', '月', '天'];

@ -2,7 +2,7 @@
<!-- 反欺诈 -->
<el-table class="c-table"
:data="form"
:max-height="height"
max-height="calc(100vh - 230px)"
:cell-style="{background:'#fff'}"
:span-method="span"
border>
@ -143,7 +143,6 @@ const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const form = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]);
const height = window.innerHeight - 230;
const symbols: Array<string> = ['>=', '<', '>', '==', '<='];
const nums: Array<number> = [2, 3, 4, 7, 10, 30, 60, 85];
const units: Array<string> = ['年', '月', '天'];

@ -2,7 +2,7 @@
<!-- 负面行业策略 -->
<el-table class="c-table"
:data="form"
:max-height="height"
max-height="calc(100vh - 230px)"
:cell-style="{background:'#fff'}"
:span-method="span"
border>
@ -84,7 +84,6 @@ const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const form = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]);
const height = window.innerHeight - 230;
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(156);

@ -21,6 +21,7 @@
class="c-table"
:key="1"
:data="list1"
max-height="calc(100vh - 420px)"
:span-method="span1"
:cell-style="{background:'#fff'}"
border>
@ -123,6 +124,7 @@
class="c-table"
:key="2"
:data="list"
max-height="calc(100vh - 420px)"
:span-method="span"
:cell-style="{background:'#fff'}"
border>

Loading…
Cancel
Save