parent
7e7c233b6b
commit
0341e2169d
5 changed files with 285 additions and 22 deletions
@ -0,0 +1,126 @@ |
||||
<template> |
||||
<!-- 贷后预警 --> |
||||
<el-table class="c-table" |
||||
:data="form" |
||||
border> |
||||
<el-table-column label="选用" |
||||
width="80" |
||||
align="center"> |
||||
<template #default="{ row }"> |
||||
<el-checkbox v-model="row.isChoose"></el-checkbox> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="recordName" |
||||
label="风险类型" |
||||
align="center"></el-table-column> |
||||
<el-table-column label="风险等级" |
||||
align="center"> |
||||
<template #default="{ row }"> |
||||
<div class="flex"> |
||||
<el-select class="mr-2" |
||||
v-model="row.riskGradeType"> |
||||
<el-option v-for="item in row?.recordChildren[1].recordChildren[0].subject.itemList" |
||||
:key="item" |
||||
:label="item.options" |
||||
:value="item.itemId" /> |
||||
</el-select> |
||||
|
||||
<el-select v-model="row.riskGrade"> |
||||
<el-option v-for="item in row?.recordChildren[1].recordChildren[1].subject.itemList" |
||||
:key="item" |
||||
:label="item.options" |
||||
:value="item.itemId" /> |
||||
</el-select> |
||||
</div> |
||||
</template></el-table-column> |
||||
</el-table> |
||||
|
||||
<div class="flex justify-end"> |
||||
<div class="submit" |
||||
@click="submit">确认完成配置</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script setup lang="ts"> |
||||
import { ref, onMounted } from 'vue'; |
||||
import { ElMessage } from 'element-plus'; |
||||
import { postLoanWarningDetails, postLoanWarningSave } from '@/api/model'; |
||||
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; |
||||
import { handleId } from '@/utils/common'; |
||||
import Cookies from 'js-cookie'; |
||||
|
||||
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 getConfig = async () => { |
||||
const { process } = await getProcessInformationBasedOnRoles(1032); |
||||
const result = []; |
||||
process.map((e, i) => { |
||||
const cur = info.value.length ? info.value[i] : {}; |
||||
result.push({ |
||||
checkpointId: levelId, |
||||
projectId, |
||||
recordName: e.name, |
||||
recordChildren: e.recordChildren, |
||||
riskGrade: +(cur.riskGrade || 747), |
||||
riskGradeType: +(cur.riskGradeType || 744), |
||||
isChoose: info.value.length ? !!cur.isChoose : false, |
||||
id: cur.id || '', |
||||
stRecordId: e.id, |
||||
}); |
||||
}); |
||||
form.value = result; |
||||
}; |
||||
// 详情 |
||||
const getDetail = async () => { |
||||
try { |
||||
const { data } = await postLoanWarningDetails(levelId, projectId); |
||||
info.value = data; |
||||
getConfig(); |
||||
} finally { |
||||
} |
||||
}; |
||||
|
||||
// 新增判分记录 |
||||
const addRecord = async (data: Record<string, any>) => { |
||||
const preIds = `1,${levelId},42,69,1032`; // 1,关卡id,角色(这个页面是风控经理策略) |
||||
const rule = []; |
||||
|
||||
data.map((e) => { |
||||
e.isChoose && rule.push(handleId(1052, '', '', `${preIds},${e.stRecordId},1052`, '')); |
||||
rule.push(handleId(1147, 299, e.riskGradeType, `${preIds},${e.stRecordId},1146,1147`, 1), handleId(1148, 300, e.riskGrade, `${preIds},${e.stRecordId},1146,1148`, 1)); |
||||
}); |
||||
|
||||
await addOperation({ |
||||
checkpointId: levelId, |
||||
parentId: preIds, |
||||
lcJudgmentRuleReq: rule, |
||||
projectId, |
||||
}); |
||||
}; |
||||
// 提交 |
||||
const submit = async () => { |
||||
let param = JSON.parse(JSON.stringify(form.value)); |
||||
param.forEach((e) => { |
||||
e.isChoose = +e.isChoose; |
||||
}); |
||||
|
||||
const recordParam = JSON.parse(JSON.stringify(param)); |
||||
param.forEach((e) => { |
||||
delete e.recordChildren; |
||||
}); |
||||
await postLoanWarningSave({ postLoanWarningList: param }); |
||||
addRecord(recordParam); |
||||
getDetail(); |
||||
ElMessage.success('提交成功!'); |
||||
}; |
||||
onMounted(() => { |
||||
getDetail(); |
||||
}); |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
@import url(../../../styles/form.scss); |
||||
</style> |
@ -0,0 +1,130 @@ |
||||
<template> |
||||
<!-- 贷后催收 --> |
||||
<el-table class="c-table" |
||||
:data="form" |
||||
:span-method="span" |
||||
border> |
||||
<el-table-column prop="recordName" |
||||
label="逾期时长" |
||||
min-width="150" |
||||
align="center"> |
||||
</el-table-column> |
||||
<el-table-column label="选择催收方式" |
||||
align="center"> |
||||
<template #default="{ row }"> |
||||
<el-checkbox v-model="row.shortMessageCollection">短信催收</el-checkbox> |
||||
<el-checkbox v-model="row.appCollection">APP催收</el-checkbox> |
||||
<el-checkbox v-model="row.automaticOutboundCall">自动外呼</el-checkbox> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="短信/APP/自动外呼 话术" |
||||
align="center"> |
||||
<template #default="{ row }"> |
||||
<el-select class="" |
||||
v-model="row.verbalTrick"> |
||||
<el-option v-for="item in row?.recordChildren[3].subject.itemList" |
||||
:key="item" |
||||
:label="item.options" |
||||
:value="item.itemId" /> |
||||
</el-select> |
||||
</template></el-table-column> |
||||
</el-table> |
||||
|
||||
<div class="flex justify-end"> |
||||
<div class="submit" |
||||
@click="submit">确认完成配置</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script setup lang="ts"> |
||||
import { ref, onMounted } from 'vue'; |
||||
import { ElMessage } from 'element-plus'; |
||||
import { collectionAfterLoanDetails, collectionAfterLoanSave } from '@/api/model'; |
||||
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; |
||||
import { handleId } from '@/utils/common'; |
||||
import Cookies from 'js-cookie'; |
||||
|
||||
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 getConfig = async () => { |
||||
const { process } = await getProcessInformationBasedOnRoles(1033); |
||||
const result = []; |
||||
process[0].recordChildren.map((e, i) => { |
||||
const cur = info.value.length ? info.value[i] : {}; |
||||
result.push({ |
||||
checkpointId: levelId, |
||||
projectId, |
||||
recordName: e.name, |
||||
recordChildren: e.recordChildren, |
||||
appCollection: info.value.length ? !!cur.appCollection : false, |
||||
automaticOutboundCall: info.value.length ? !!cur.automaticOutboundCall : false, |
||||
shortMessageCollection: info.value.length ? !!cur.shortMessageCollection : false, |
||||
verbalTrick: +(cur.verbalTrick || 750), |
||||
id: cur.id || '', |
||||
stRecordId: e.id, |
||||
}); |
||||
}); |
||||
form.value = result; |
||||
}; |
||||
// 详情 |
||||
const getDetail = async () => { |
||||
try { |
||||
const { data } = await collectionAfterLoanDetails(levelId, projectId); |
||||
info.value = data; |
||||
getConfig(); |
||||
} finally { |
||||
} |
||||
}; |
||||
|
||||
const fieldKeys = ['shortMessageCollection', 'appCollection', 'automaticOutboundCall']; |
||||
// 新增判分记录 |
||||
const addRecord = async (data: Record<string, any>) => { |
||||
const preIds = `1,${levelId},42,69,1033,1149`; // 1,关卡id,角色(这个页面是风控经理策略) |
||||
const rule = []; |
||||
|
||||
data.map((e) => { |
||||
e.recordChildren.forEach((n, i) => { |
||||
if (i !== 3) { |
||||
e[fieldKeys[i]] && rule.push(handleId(n.id, '', '', `${preIds},${e.stRecordId},${n.id}`, '')); |
||||
} else { |
||||
rule.push(handleId(n.id, n.subjectId, e.verbalTrick, `${preIds},${e.stRecordId},${n.id}`, 1)); |
||||
} |
||||
}); |
||||
}); |
||||
|
||||
await addOperation({ |
||||
checkpointId: levelId, |
||||
parentId: preIds, |
||||
lcJudgmentRuleReq: rule, |
||||
projectId, |
||||
}); |
||||
}; |
||||
// 提交 |
||||
const submit = async () => { |
||||
let param = JSON.parse(JSON.stringify(form.value)); |
||||
param.map((e) => { |
||||
e.appCollection = +e.appCollection; |
||||
e.automaticOutboundCall = +e.automaticOutboundCall; |
||||
e.shortMessageCollection = +e.shortMessageCollection; |
||||
}); |
||||
|
||||
const recordParam = JSON.parse(JSON.stringify(param)); |
||||
param.map((e) => { |
||||
delete e.recordChildren; |
||||
}); |
||||
await collectionAfterLoanSave({ collectionAfterLoanList: param }); |
||||
addRecord(recordParam); |
||||
getDetail(); |
||||
ElMessage.success('提交成功!'); |
||||
}; |
||||
onMounted(() => { |
||||
getDetail(); |
||||
}); |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
@import url(../../../styles/form.scss); |
||||
</style> |
Loading…
Reference in new issue