Commit 0c4dc28a authored by 沈翠玲's avatar 沈翠玲

资产详情接口对接

parent abd750cd
import request from '@/utils/http/index';
// 资产列表
export const getCreditPage = (params) => {
return request.get('/Loan/page', params);
};
// 根据id获取资产详情
export const getCredit = (id) => {
return request.get('/Loan/getById?id=' + id);
};
// 根据借款人查询所有的案件
export const listByBorrower = (id) => {
return request.get('/Loan/listByBorrower?borrowerId=' + id);
};
export const saveUser = (data) => {
return request.post('/login/save', data);
// 根据借款人查询所有的跟进记录
export const getTrackRecordPage = (id) => {
return request.get('/Loan/getTrackRecords?borrowerId=' + id);
};
export const getCreditPage = (params) => {
return request.get('/Credit/page', params);
// 根据借款人查询所有的减免记录
export const getReduces = (id) => {
return request.get('/Loan/getReduces?borrowerId=' + id);
};
export const getCredit = (id) => {
return request.get('/Credit/getById?id=' + id);
// 根据借款人查询所有的分期记录
export const getByStages = (id) => {
return request.get('/Loan/getByStages?borrowerId=' + id);
};
// 根据借款人查询所有的还款记录
export const getRepayRecords = (id) => {
return request.get('/Loan/getRepayRecords?borrowerId=' + id);
};
// 还款申请保存
export const saveRepayRecord = (data) => {
return request.post('/repayRecord/save', data);
};
// 减免申请保存
export const saveReduce = (data) => {
return request.post('/reduce/save', data);
};
export const getTrackRecordPage = (params) => {
return request.get('/TrackRecord/page', params);
// 分期申请保存
export const savebyStages = (data) => {
return request.post('/byStages/save', data);
};
// 保存案件跟踪记录
export const saveTrackRecord = (data) => {
return request.post('/TrackRecord/save', data);
};
<template>
<div class="card content-box">
<div class="table-box">
<span class="text"> 稽核管理 🍓🍇🍈🍉</span>
</div>
</template>
......
......@@ -18,7 +18,7 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item class="w-full" label="减免类型:" prop="name" label-width="82px">
<el-select v-model="form.relation" placeholder="请选择">
<el-select v-model="form.reduceType" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
......@@ -30,26 +30,28 @@
</el-col>
<el-col :span="12">
<el-form-item class="w-full" label="减免申请时间:" prop="code">
<el-date-picker v-model="form.datetime" type="datetime" />
<el-date-picker v-model="form.applyDate" type="datetime" />
</el-form-item>
</el-col>
<el-col :span="12">
<!-- <el-col :span="12">
<el-form-item class="w-full" label="减免到期时间:" prop="code">
<el-date-picker v-model="form.datetime" type="datetime" />
</el-form-item>
</el-col>
</el-col> -->
<el-col :span="12">
<el-form-item class="w-full" label="减免金额(总计):" prop="name" label-width="120px">
4444
{{ form.totalReduceAmount }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="w-full" label="减免案件数:" prop="role"> 1 </el-form-item>
<el-form-item class="w-full" label="减免案件数:" prop="role">{{
form.totalNumber
}}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="w-full" label="应还金额:" prop="relation">
<div>
<p>3000</p>
<p>{{ form.totalPayAmount }}</p>
<p class="text-red-600 leading-3">*应还金额</p>
</div>
</el-form-item>
......@@ -77,85 +79,124 @@
import dayjs from 'dayjs';
import { computed } from 'vue';
import { reactive, ref } from 'vue';
import { saveReduce } from '@/api/property';
const showModal = ref(false);
const tabledata = ref([]);
const form = reactive({
name: '',
relation: '',
datetime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
totalReduceAmount: 0,
totalNumber: '',
reduceType: 'settle',
totalPayAmount: 0,
applyDate: dayjs().format('YYYY-MM-DD HH:mm:ss'),
});
const currentAccount = ref({ people: 0, case: 0, money: 0 });
const selectdList = ref([]);
const onCheckboxChange = (row) => {
selectdList.value = row.records;
form.totalNumber = row.records.length;
};
const currentDetail = ref({});
const onHide = (done) => {
currentAccount.value = { people: 0, case: 0, money: 0 };
currentDetail.value = {};
done();
};
const options = [
{
value: 'Option1',
label: 'Option1',
},
{
value: 'Option2',
label: 'Option2',
value: 'settle',
label: '结清减免',
},
{
value: 'Option3',
label: 'Option3',
},
{
value: 'Option4',
label: 'Option4',
},
{
value: 'Option5',
label: 'Option5',
value: 'by_stages',
label: '分期减免',
},
];
const config = reactive({
minHeight: 200,
columns: [
// { type: 'checkbox', title: '', width: '40px' },
{
field: 'code',
field: 'caseId',
title: '案件ID',
},
{
field: 'code',
field: 'product',
title: '产品',
},
{
field: 'code',
field: 'payOrg',
title: '借款机构',
},
{
field: 'code',
field: 'commissionAmount',
title: '委案金额',
},
{
field: 'code',
field: 'sumReductionAmount',
title: '累计减免金额',
},
{
field: 'code',
field: 'sumRepayAmount',
title: '累计还款金额',
},
{
field: 'code',
title: '剩余待还金额',
field: 'reduceAmount',
title: '减免金额',
slots: {
default: ({ row, rowIndex }) => {
return (
<>
<ElInput v-model={row.reduceAmount} onChange={() => changeNum(row, rowIndex)} />
</>
);
},
},
},
{
field: 'remainingAmount',
title: '剩余待还金额(减免前)',
},
{
field: 'payAmount',
title: '应还金额(减免后)',
},
],
onCheckboxChange: onCheckboxChange,
toolbarConfig: { enabled: false },
});
tabledata.value = [
{ name: 'admin', code: 'admin', role: 'superadmin', num: 1 },
{ name: 'account1', code: 'account1', role: 'user', num: 1 },
{ name: 'account2', code: 'account2', role: 'user', num: 1 },
{ name: 'account3', code: 'account3', role: 'user', num: 1 },
];
const openModal = (account) => {
const changeNum = (row) => {
row.payAmount = row.remainingAmount - row.reduceAmount;
form.totalReduceAmount = 0;
form.totalPayAmount = 0;
tabledata.value.forEach((item) => {
form.totalReduceAmount += Number(item.reduceAmount) || 0;
form.totalPayAmount += Number(item.payAmount) || 0;
});
};
const openModal = (detail, caselist) => {
showModal.value = true;
currentAccount.value = { people: 333, case: 44, money: 1111 };
currentDetail.value = detail;
console.log('currentDetail', currentDetail.value, caselist);
form.totalReduceAmount = 0;
form.totalPayAmount = 0;
caselist.forEach((item) => {
form.totalReduceAmount += Number(item.reduceAmount) || 0;
form.totalPayAmount += Number(item.payAmount) || 0;
});
tabledata.value = caselist;
form.totalNumber = caselist.length;
};
const submitForm = () => {
const params = {
...currentDetail.value,
...form,
reduceRecords: tabledata.value,
id: null,
};
saveReduce(params).then((res) => {
if (res.success) {
}
});
};
const submitForm = () => {};
defineExpose({
openModal,
});
......
......@@ -27,18 +27,18 @@
<el-row>
<el-col :span="24">
<el-form-item class="w-full" label="剩余待还总额:" prop="name">
{{ form.sum }}
{{ form.remainingAmount }}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item class="w-full" label="还款总额:" prop="code">
<el-input v-model="form.num" placeholder="请输入" />
<el-input v-model="form.totalRepayAmount" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item class="w-full" label="分期申请时间:" prop="code">
<el-date-picker
v-model="form.datetime"
v-model="form.applyDate"
class="w-full"
format="YYYY-MM-DD HH:mm:ss"
type="datetime"
......@@ -47,7 +47,7 @@
</el-col>
<el-col :span="24">
<el-form-item class="w-full" label="还款期数:" prop="name">
<el-select v-model="form.splitnum" placeholder="请选择">
<el-select v-model="form.totalPeriod" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
......@@ -61,7 +61,7 @@
<el-form-item class="w-full" label="首期还款日:" prop="code">
<el-date-picker
class="w-full"
v-model="form.datetime"
v-model="form.firstApplyDate"
format="YYYY-MM-DD HH:mm:ss"
type="datetime"
/>
......@@ -80,7 +80,7 @@
<el-col :span="24">
<el-form-item class="w-full" label="分期生效时间:" prop="code">
<el-date-picker
v-model="form.datetime"
v-model="form.effectiveTime"
class="w-full"
format="YYYY-MM-DD HH:mm:ss"
type="datetime"
......@@ -124,36 +124,38 @@
const splitdata = ref([]);
const form = reactive({
sum: 0,
num: 0,
splitnum: 2,
datetime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
remainingAmount: 0,
totalRepayAmount: 0,
totalPeriod: 2,
applyDate: dayjs().format('YYYY-MM-DD HH:mm:ss'),
firstApplyDate: dayjs().format('YYYY-MM-DD HH:mm:ss'),
effectiveTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
});
const currentAccount = ref({ people: 0, case: 0, money: 0 });
const currentDetail = ref({});
const onHide = (done) => {
currentAccount.value = { people: 0, case: 0, money: 0 };
currentDetail.value = {};
done();
};
const options = [
{
value: 'Option1',
label: 'Option1',
value: '2',
label: '2',
},
{
value: 'Option2',
label: 'Option2',
value: '3',
label: '3',
},
{
value: 'Option3',
label: 'Option3',
value: '4',
label: '4',
},
{
value: 'Option4',
label: 'Option4',
value: '5',
label: '5',
},
{
value: 'Option5',
label: 'Option5',
value: '6',
label: '6',
},
];
const selectdList = ref([]);
......@@ -163,33 +165,33 @@
const config = reactive({
minHeight: 200,
columns: [
{ type: 'checkbox', width: 50 },
// { type: 'checkbox', width: 50 },
{
field: 'code',
field: 'caseId',
title: '案件ID',
},
{
field: 'code',
field: 'product',
title: '产品',
},
{
field: 'code',
field: 'payOrg',
title: '借款机构',
},
{
field: 'code',
field: 'commissionAmount',
title: '委案金额',
},
{
field: 'code',
field: 'sumReductionAmount',
title: '累计减免金额',
},
{
field: 'code',
field: 'sumRepayAmount',
title: '累计还款金额',
},
{
field: 'code',
field: 'remainingAmount',
title: '剩余待还金额',
},
],
......@@ -243,9 +245,17 @@
{ name: 'account2', code: 'account2', role: 'user', num: 1 },
{ name: 'account3', code: 'account3', role: 'user', num: 1 },
];
const openModal = (account) => {
const openModal = (detail, caselist) => {
showModal.value = true;
currentAccount.value = { people: 333, case: 44, money: 1111 };
currentDetail.value = detail;
console.log('currentDetail', currentDetail.value, caselist);
form.totalRepayAmount = 0;
form.remainingAmount = 0;
caselist.forEach((item) => {
form.totalRepayAmount += Number(item.remainingAmount) || 0;
form.remainingAmount += Number(item.remainingAmount) || 0;
});
tabledata.value = caselist;
};
const submitForm = () => {};
defineExpose({
......
......@@ -74,6 +74,7 @@
<vxe-grid
v-bind="caseDetailConfig"
:show-footer="true"
:footer-method="footerMethod"
ref="caseDetailRef"
@cell-click="onCellCase"
>
......@@ -141,27 +142,6 @@
<div id="reducerecord">
<div class="box-title">减免记录</div>
<div class="box-content">
<table style="margin-bottom: 10px">
<tbody>
<tr>
<td class="label">减免类型</td>
<td>John Doe</td>
<td class="label">减免申请ID</td>
<td>30</td>
<td class="label">减免申请时间</td>
<td>30</td>
</tr>
<tr>
<td class="label">减免金额(总计)</td>
<td>johndoe@example.com</td>
<td class="label">减免案件数</td>
<td>johndoe@example.com</td>
<td class="label">减免生效时间</td>
<td>johndoe@example.com</td>
</tr>
</tbody>
<!-- Add more rows as needed -->
</table>
<ProTable
:config="reduceConfig"
:data="reduceData"
......@@ -172,8 +152,8 @@
</div>
<div id="splitrecord">
<div class="box-title">分期记录</div>
<div class="box-content">
<table style="margin-bottom: 10px">
<div class="box-content flex">
<!-- <table style="margin-bottom: 10px">
<tbody>
<tr>
<td class="label">分期申请ID</td>
......@@ -192,16 +172,25 @@
<td>johndoe@example.com</td>
</tr>
</tbody>
<!-- Add more rows as needed -->
</table>
</table> -->
<div class="w-2/3">
<ProTable
:config="recordConfig"
:data="recordData"
:config="splitConfig"
:data="splitData"
:showPagination="false"
:showToolBar="false"
/>
</div>
<div class="w-1/3 pl-3">
<ProTable
:config="splitDeConfig"
:data="splitDeData"
:showPagination="false"
:showToolBar="false"
/>
</div>
</div>
</div>
<div id="returnrecord">
<div class="box-title">还款记录</div>
<div class="box-content">
......@@ -224,17 +213,26 @@
<script setup lang="jsx" name="caseDetail">
import { useRoute } from 'vue-router';
import { reactive, ref, onBeforeMount } from 'vue';
import { reactive, ref, onBeforeMount, onMounted } from 'vue';
import { ElButton } from 'element-plus';
import repairModal from './components/repairModal.vue';
import returnModal from './components/returnModal.vue';
import reduceDrawer from './components/reduceDrawer.vue';
import splitDrawer from './components/splitDrawer.vue';
import callDrawer from './components/callDrawer.vue';
import { getCredit, getTrackRecordPage, getCreditPage } from '@/api/property';
import {
getCredit,
getTrackRecordPage,
getReduces,
getByStages,
listByBorrower,
getRepayRecords,
} from '@/api/property';
const returnData = ref([]);
const recordData = ref([]);
const reduceData = ref([]);
const splitData = ref([]);
const splitDeData = ref([]);
const detail = ref({
borrower: {
guarantors: [],
......@@ -243,11 +241,14 @@
const caseDetailRef = ref();
const returnModalRef = ref();
const repairModalRef = ref();
const reduceTRef = ref();
const splitDrawerRef = ref();
const callDrawerRef = ref();
const reduceDrawerRef = ref();
const route = useRoute();
const borrowerPara = reactive({
borrowerId: 'sss',
});
const activeStep = ref(2);
const stepList = ref([
{ title: '已分派', desc: 'sadas' },
......@@ -260,38 +261,69 @@
JSON.parse(JSON.stringify(detail.value))
);
};
const followStatusOpt = [
{ label: '接通后挂断', value: 'hang_up' },
{ label: '接通有实质进展', value: 'progress' },
{ label: '接通有效转告', value: 'pass_on' },
{ label: '接通拒绝转告', value: 'no_pass' },
{ label: '接听后挂断', value: 'Hang_up_after_answering' },
{ label: '接通无应答', value: 'No_response_when_connected' },
{ label: '称与债人无关', value: 'Claims_unrelated_to_creditors' },
{ label: '称非本人', value: 'Claiming_not_to_be_myself' },
{ label: '无人接听', value: 'no_answer' },
{ label: '关机', value: 'Shutdown' },
{ label: '空号', value: 'dead_number' },
{ label: '占线/忙音/正在通话中', value: 'Busy' },
{ label: '停机', value: 'closing_down' },
{ label: '机器人回复', value: 'Robot_reply' },
{ label: '微信', value: 'WeChat' },
{ label: '短信', value: 'short_message' },
{ label: 'QQ', value: 'QQ' },
{ label: '飞书', value: 'fly' },
{ label: '钉钉', value: 'DING' },
];
const phoneResultStatusOpt = [
{ label: '后续再跟进', value: 'later' },
{ label: '承诺还款', value: 'Promise_Repayment' },
{ label: '暂无还款意愿', value: 'No_Repay' },
{ label: '要求停催', value: 'Stop_Urging' },
{ label: '情绪激动抗拒', value: 'resistance' },
{ label: '拒绝还款', value: 'Refuse_Repayment' },
{ label: '已还款', value: 'Repaired' },
{ label: '代履行还款', value: 'repayment_others' },
];
const returnConfig = reactive({
columns: [
{
field: 'code',
field: 'id',
title: '还款记录ID',
},
{
field: 'code',
field: 'realRepayAmount',
title: '实际还款金额',
},
{
field: 'code',
field: 'realRepayTime',
title: '实际还款时间',
},
{
field: 'code',
field: 'reduce.id',
title: '关联减免ID',
},
{
field: 'code',
field: 'stages.id',
title: '关联分期ID',
},
{
field: 'code',
field: 'stages.totalPeriod',
title: '关联分期期次',
},
{
field: 'code',
field: 'reduce.totalPayAmount',
title: '应还金额',
},
{
field: 'code',
field: 'stages.loans.payOrg',
title: '借款机构',
},
],
......@@ -312,37 +344,49 @@
title: '下次跟进时间',
},
{
field: 'code',
field: 'guarantor.name',
title: '联系人姓名',
slots: {
default: ({ row }) => {
return <>{row?.credit?.borrower?.name}</>;
},
},
},
{
field: 'code',
field: 'guarantor.phone',
title: '联系人号码',
},
{
field: 'followStatus',
title: '拨打跟进结果',
slots: {
default: ({ row }) => {
return <>{row?.credit?.borrower?.phone}</>;
},
return (
<>
{row.followStatus
? followStatusOpt.find((v) => v.value === row.followStatus).label
: ''}
</>
);
},
},
{
field: 'code',
title: '拨打跟进结果',
},
{
field: 'phoneResultStatus',
title: '拨打处置状态',
slots: {
default: ({ row }) => {
return (
<>
{row.phoneResultStatus
? phoneResultStatusOpt.find((v) => v.value === row.phoneResultStatus).label
: ''}
</>
);
},
},
},
{
field: 'remark',
title: '备注',
},
{
field: 'code',
field: 'voices',
title: '通话录音',
},
{
......@@ -394,8 +438,12 @@
default: ({ row, rowIndex }) => {
return (
<>
{/* <ElButton type="primary" onClick={() => callTelephone(row)} disabled={row.status !== 'Y'}> */}
<ElButton type="primary" onClick={() => callTelephone(row)}>
<ElButton
type="primary"
onClick={() => callTelephone(row)}
disabled={row.status !== 'Y'}
>
{/* <ElButton type="primary" onClick={() => callTelephone(row)}> */}
拨打跟进
</ElButton>
</>
......@@ -413,40 +461,46 @@
repairModalRef.value.openModal(JSON.parse(JSON.stringify(detail.value)));
};
const reduce = () => {
reduceDrawerRef.value.openModal(JSON.parse(JSON.stringify(detail.value)));
reduceDrawerRef.value.openModal(
JSON.parse(JSON.stringify(detail.value)),
JSON.parse(JSON.stringify(caseDetailConfig.data))
);
};
const split = () => {
splitDrawerRef.value.openModal(JSON.parse(JSON.stringify(detail.value)));
splitDrawerRef.value.openModal(
JSON.parse(JSON.stringify(detail.value)),
JSON.parse(JSON.stringify(caseDetailConfig.data))
);
};
const caseDetailConfig = reactive({
columns: [
{ type: 'expand', width: 80, slots: { content: 'expand_content' } },
{
field: 'id',
field: 'caseId',
title: '案件ID',
},
{
field: 'code',
field: 'product',
title: '产品',
},
{
field: 'code',
field: 'payOrg',
title: '借款机构',
},
{
field: 'code',
title: '案金额',
field: 'commissionAmount',
title: '案金额',
},
{
field: 'code',
field: 'sumReductionAmount',
title: '累计减免金额',
},
{
field: 'code',
field: 'sumRepayAmount',
title: '累计还款金额',
},
{
field: 'code',
field: 'remainingAmount',
title: '剩余待还金额',
},
{
......@@ -465,30 +519,138 @@
},
},
],
data: [
{ id: 10001, name: 'Test1', role: 'Develop', sex: 'Man', age: 28, address: 'test abc' },
{ id: 10002, name: 'Test2', role: 'Test', sex: 'Women', age: 22, address: 'Guangzhou' },
{ id: 10003, name: 'Test3', role: 'PM', sex: 'Man', age: 32, address: 'Shanghai' },
{ id: 10004, name: 'Test4', role: 'Designer', sex: 'Women', age: 24, address: 'Shanghai' },
data: [],
toolbarConfig: { enabled: false },
});
const onCellClick = ({ row, rowIndex }) => {
splitDeData.value = row.byStagesRecords;
};
// 进行合计
const sumNum = (costForm, type) => {
let total = 0;
for (let i = 0; i < costForm.length; i++) {
total += costForm[i][type];
}
return total;
};
const footerMethod = ({ columns, data }) => {
const footerData = [
columns.map((column, _columnIndex) => {
if (_columnIndex === 0) {
return '合计';
}
if (
['commissionAmount', 'sumReductionAmount', 'sumRepayAmount', 'remainingAmount'].includes(
column.field
)
) {
return sumNum(data, column.field);
}
return null;
}),
];
return footerData;
};
const splitConfig = reactive({
columns: [
{
field: 'caseId',
title: '案件ID',
width: 80,
},
{
field: 'payOrg',
title: '借款机构',
},
{
field: 'totalRepayAmount',
title: '还款总额',
width: 80,
},
{
field: 'applyDate',
title: '分期申请时间',
width: 115,
},
{
field: 'effectiveTime',
title: '分期生效时间',
width: 115,
},
{
field: 'totalPeriod',
title: '还款期数',
width: 80,
},
{
field: 'firstApplyDate',
title: '首期还款日',
width: 100,
},
{
field: 'remainingAmount',
title: '剩余待还金额',
width: 110,
},
],
onCellClick: onCellClick,
toolbarConfig: { enabled: false },
});
console.log('sada', detail.value?.borrower?.idCard);
const getTrackRecordList = (id) => {
getTrackRecordPage({
current: 1,
size: 9999999,
creditId: id,
}).then((res) => {
if (res.result && res.result.content) {
recordData.value = res.result.content;
const splitDeConfig = reactive({
columns: [
{
field: 'period',
title: '期次',
},
{
field: 'playApplyDate',
title: '到期日',
},
{
field: 'repayStatus',
title: '状态',
slots: {
default: ({ row }) => {
return <>{row.repayStatus ? (row.repayStatus === 'over' ? '已还款' : '待还款') : ''}</>;
},
},
},
{
field: 'applyAmount',
title: '金额',
},
{
field: 'code',
title: '操作',
slots: {
default: ({ row, rowIndex }) => {
return (
<>
<ElButton
type="primary"
onClick={() => returnCrash(row)}
disabled={row.repayStatus !== 'over'}
>
还款
</ElButton>
</>
);
},
},
},
],
toolbarConfig: { enabled: false },
});
const getTrackRecordList = (borrowerId) => {
getTrackRecordPage(borrowerId).then((res) => {
if (res.result && res.result) {
recordData.value = res.result;
}
});
};
const onCellCase = ({ row, rowIndex }) => {
getTrackRecordList(row.id);
getTrackRecordList(row.borrower.id);
};
const anchor = (type) => {
document.querySelector(`#${type}`).scrollIntoView(true);
......@@ -503,50 +665,61 @@
const reduceConfig = reactive({
columns: [
{
field: 'code',
title: '跟进记录ID',
field: 'caseId',
title: '案件ID',
},
{
field: 'code',
title: '跟进日期',
field: 'reduceAmount',
title: '减免金额',
},
{
field: 'code',
title: '下次跟进时间',
field: 'totalReduceAmount',
title: '减免金额(总计)',
},
{
field: 'code',
title: '联系人姓名',
field: 'totalNumber',
title: '减免案件数',
},
{
field: 'code',
title: '联系人号码',
field: 'remainingAmount',
title: '剩余待还金额',
},
{
field: 'code',
title: '拨打跟进结果',
field: 'totalPayAmount',
title: '累计还款金额',
},
{
field: 'code',
title: '拨打处置状态',
field: 'reduceType',
title: '减免类型',
slots: {
default: ({ row }) => {
return (
<>{row.reduceType ? (row.reduceType === 'settle' ? '结清减免' : '分期减免') : ''}</>
);
},
},
},
{
field: 'code',
title: '备注',
field: 'id',
title: '减免申请ID',
},
{
field: 'code',
title: '通话录音',
field: 'applyDate',
title: '减免申请时间',
},
{
field: 'inEffectDate',
title: '减免生效时间',
},
{
field: 'code',
title: '微信图片附件',
title: '操作',
slots: {
default: ({ row, rowIndex }) => {
return (
<>
<ElButton type="primary" link onClick={() => callTelephone(row)}>
下载
<ElButton type="primary" link onClick={() => returnCrash(row)}>
还款
</ElButton>
</>
);
......@@ -556,32 +729,32 @@
],
toolbarConfig: { enabled: false },
});
recordData.value = [
{ name: 'admin', code: 'admin', role: 'superadmin', num: 1 },
{ name: 'account1', code: 'account1', role: 'user', num: 1 },
{ name: 'account2', code: 'account2', role: 'user', num: 1 },
{ name: 'account3', code: 'account3', role: 'user', num: 1 },
];
returnData.value = [
{ name: 'admin', code: 'admin', role: 'superadmin', num: 1 },
{ name: 'account1', code: 'account1', role: 'user', num: 1 },
{ name: 'account2', code: 'account2', role: 'user', num: 1 },
{ name: 'account3', code: 'account3', role: 'user', num: 1 },
];
onBeforeMount(async () => {
const id = JSON.parse(route.query.id);
const { result } = await getCredit(id);
detail.value = result;
console.log('resultresult', detail.value);
getTrackRecordList(detail.value?.id);
if (detail.value?.borrower?.idCard) {
getCreditPage({ current: 1, size: 99999999, idCard: detail.value?.borrower?.idCard }).then(
(res) => {
if (res.result && res.result.content) {
caseDetailConfig.data = res.result.content;
if (detail.value?.borrower?.id) {
getTrackRecordList(detail.value?.borrower?.id);
listByBorrower(detail.value?.borrower?.id).then((res) => {
if (res.result && res.result) {
caseDetailConfig.data = res.result;
}
});
getReduces(detail.value?.borrower?.id).then((res) => {
if (res.result && res.result) {
reduceData.value.data = res.result;
}
);
});
getByStages(detail.value?.borrower?.id).then((res) => {
if (res.result && res.result) {
splitData.value.data = res.result;
}
});
getRepayRecords(detail.value?.borrower?.id).then((res) => {
if (res.result && res.result) {
returnData.value.data = res.result;
}
});
}
});
</script>
......
......@@ -29,102 +29,125 @@
import { onMounted } from 'vue';
const router = useRouter();
const options = ref([]);
const onCellClick = ({ row, rowIndex }) => {
router.push({
path: '/property/case-detail',
query: { id: row.id }, //这里不能直接写成 query: JSON.stringify(item)
});
};
const followStatusOpt = [
{ label: '接通后挂断', value: 'hang_up' },
{ label: '接通有实质进展', value: 'progress' },
{ label: '接通有效转告', value: 'pass_on' },
{ label: '接通拒绝转告', value: 'no_pass' },
{ label: '接听后挂断', value: 'Hang_up_after_answering' },
{ label: '接通无应答', value: 'No_response_when_connected' },
{ label: '称与债人无关', value: 'Claims_unrelated_to_creditors' },
{ label: '称非本人', value: 'Claiming_not_to_be_myself' },
{ label: '无人接听', value: 'no_answer' },
{ label: '关机', value: 'Shutdown' },
{ label: '空号', value: 'dead_number' },
{ label: '占线/忙音/正在通话中', value: 'Busy' },
{ label: '停机', value: 'closing_down' },
{ label: '机器人回复', value: 'Robot_reply' },
{ label: '微信', value: 'WeChat' },
{ label: '短信', value: 'short_message' },
{ label: 'QQ', value: 'QQ' },
{ label: '飞书', value: 'fly' },
{ label: '钉钉', value: 'DING' },
];
const phoneResultStatusOpt = [
{ label: '后续再跟进', value: 'later' },
{ label: '承诺还款', value: 'Promise_Repayment' },
{ label: '暂无还款意愿', value: 'No_Repay' },
{ label: '要求停催', value: 'Stop_Urging' },
{ label: '情绪激动抗拒', value: 'resistance' },
{ label: '拒绝还款', value: 'Refuse_Repayment' },
{ label: '已还款', value: 'Repaired' },
{ label: '代履行还款', value: 'repayment_others' },
];
const creditStatusOpt = [
{ label: '正常', value: 'normal' },
{ label: '撤案', value: 'withdraw' },
{ label: '留案', value: 'stay' },
];
const config = reactive({
columns: [
{ field: 'id', title: '案件ID', search: { el: 'input' }, width: 80 },
{ field: 'caseId', title: '案件ID', search: { el: 'input' }, width: 80 },
{
field: 'code',
field: 'payOrg',
title: '借款机构',
width: 100,
search: { el: 'input', props: { clearable: true } },
},
{
field: 'code',
field: 'manageOrg',
title: '资管公司',
width: 100,
search: { el: 'input', props: { clearable: true } },
},
{
field: 'role',
field: 'borrower.name',
title: '借款人姓名',
width: 120,
search: {
el: 'input',
key: 'borrower.name',
props: { clearable: true },
slots: {
default: ({ row }) => {
return <>{row?.borrower?.name}</>;
},
},
},
},
{
field: 'role',
field: 'borrower.idCard',
title: '身份证',
width: 140,
search: {
el: 'input',
props: { clearable: true },
slots: {
default: ({ row }) => {
return <>{row?.borrower?.idCard}</>;
},
},
key: 'borrower.idCard',
},
},
{
field: 'role',
field: 'borrower.phone',
title: '手机号',
width: 140,
search: {
el: 'input',
props: { clearable: true },
slots: {
default: ({ row }) => {
return <>{row?.borrower?.phone}</>;
},
},
key: 'borrower.phone',
},
},
{
field: 'loanAmount',
field: 'commissionAmount',
title: '委案金额',
width: 80,
search: { el: 'input', props: { clearable: true } },
},
{
field: 'role',
field: 'sumRepayAmount',
title: '累计还款金额',
width: 110,
search: { el: 'input', props: { clearable: true } },
},
{
field: 'role',
field: 'sumReductionAmount',
title: '累计减免金额',
width: 110,
search: { el: 'input', props: { clearable: true } },
},
{
field: 'role',
field: 'remainingAmount',
title: '剩余待还金额',
width: 110,
search: { el: 'input', props: { clearable: true } },
},
{
field: 'role',
field: 'cpe.username',
title: 'CPE',
width: 80,
search: { el: 'input', props: { clearable: true } },
search: { el: 'input', props: { clearable: true }, key: 'cpe.username' },
},
{
field: 'role',
field: 'cpeDate',
title: '分配CPE日期',
width: 110,
search: { el: 'date-picker', props: { type: 'date', valueFormat: 'YYYY-MM-DD' } },
......@@ -148,28 +171,61 @@
search: { el: 'input', props: { clearable: true } },
},
{
field: 'role',
field: 'followStatus',
title: '跟进结果',
width: 80,
enum: options,
enum: followStatusOpt,
search: { el: 'select', props: { filterable: true }, span: 1 },
fieldNames: { label: 'genderLabel', value: 'genderValue' },
fieldNames: { label: 'label', value: 'value' },
slots: {
default: ({ row }) => {
return (
<>
{row.followStatus
? followStatusOpt.find((v) => v.value === row.followStatus).label
: ''}
</>
);
},
},
},
{
field: 'role',
field: 'phoneResultStatus',
title: '跟进状态',
width: 80,
enum: options,
enum: phoneResultStatusOpt,
search: { el: 'select', props: { filterable: true }, span: 1 },
fieldNames: { label: 'genderLabel', value: 'genderValue' },
fieldNames: { label: 'label', value: 'value' },
slots: {
default: ({ row }) => {
return (
<>
{row.phoneResultStatus
? phoneResultStatusOpt.find((v) => v.value === row.phoneResultStatus).label
: ''}
</>
);
},
},
},
{
field: 'creditStatus',
title: '案件状态',
width: 80,
enum: options,
enum: creditStatusOpt,
search: { el: 'select', props: { filterable: true }, span: 1 },
fieldNames: { label: 'genderLabel', value: 'genderValue' },
fieldNames: { label: 'label', value: 'value' },
slots: {
default: ({ row }) => {
return (
<>
{row.creditStatus
? creditStatusOpt.find((v) => v.value === row.creditStatus).label
: ''}
</>
);
},
},
},
],
onCellClick: onCellClick,
......
......@@ -55,7 +55,7 @@ export default defineConfig(({ command, mode }) => {
port: VITE_PORT,
proxy: {
'/api': {
target: 'http://8.152.205.9:8080',
target: 'http://192.168.31.128:8080',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment