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

资产详情接口对接

parent abd750cd
import request from '@/utils/http/index'; 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) => { export const saveTrackRecord = (data) => {
return request.post('/TrackRecord/save', data); return request.post('/TrackRecord/save', data);
}; };
<template> <template>
<div class="card content-box"> <div class="table-box">
<span class="text"> 稽核管理 🍓🍇🍈🍉</span> <span class="text"> 稽核管理 🍓🍇🍈🍉</span>
</div> </div>
</template> </template>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item class="w-full" label="减免类型:" prop="name" label-width="82px"> <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 <el-option
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.value"
...@@ -30,26 +30,28 @@ ...@@ -30,26 +30,28 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item class="w-full" label="减免申请时间:" prop="code"> <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-form-item>
</el-col> </el-col>
<el-col :span="12"> <!-- <el-col :span="12">
<el-form-item class="w-full" label="减免到期时间:" prop="code"> <el-form-item class="w-full" label="减免到期时间:" prop="code">
<el-date-picker v-model="form.datetime" type="datetime" /> <el-date-picker v-model="form.datetime" type="datetime" />
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="12"> <el-col :span="12">
<el-form-item class="w-full" label="减免金额(总计):" prop="name" label-width="120px"> <el-form-item class="w-full" label="减免金额(总计):" prop="name" label-width="120px">
4444 {{ form.totalReduceAmount }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <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>
<el-col :span="12"> <el-col :span="12">
<el-form-item class="w-full" label="应还金额:" prop="relation"> <el-form-item class="w-full" label="应还金额:" prop="relation">
<div> <div>
<p>3000</p> <p>{{ form.totalPayAmount }}</p>
<p class="text-red-600 leading-3">*应还金额</p> <p class="text-red-600 leading-3">*应还金额</p>
</div> </div>
</el-form-item> </el-form-item>
...@@ -77,85 +79,124 @@ ...@@ -77,85 +79,124 @@
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { computed } from 'vue'; import { computed } from 'vue';
import { reactive, ref } from 'vue'; import { reactive, ref } from 'vue';
import { saveReduce } from '@/api/property';
const showModal = ref(false); const showModal = ref(false);
const tabledata = ref([]); const tabledata = ref([]);
const form = reactive({ const form = reactive({
name: '', totalReduceAmount: 0,
relation: '', totalNumber: '',
datetime: dayjs().format('YYYY-MM-DD HH:mm:ss'), 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) => { const onHide = (done) => {
currentAccount.value = { people: 0, case: 0, money: 0 }; currentDetail.value = {};
done(); done();
}; };
const options = [ const options = [
{ {
value: 'Option1', value: 'settle',
label: 'Option1', label: '结清减免',
},
{
value: 'Option2',
label: 'Option2',
},
{
value: 'Option3',
label: 'Option3',
}, },
{ {
value: 'Option4', value: 'by_stages',
label: 'Option4', label: '分期减免',
},
{
value: 'Option5',
label: 'Option5',
}, },
]; ];
const config = reactive({ const config = reactive({
minHeight: 200, minHeight: 200,
columns: [ columns: [
// { type: 'checkbox', title: '', width: '40px' },
{ {
field: 'code', field: 'caseId',
title: '案件ID', title: '案件ID',
}, },
{ {
field: 'code', field: 'product',
title: '产品', title: '产品',
}, },
{ {
field: 'code', field: 'payOrg',
title: '借款机构', title: '借款机构',
}, },
{ {
field: 'code', field: 'commissionAmount',
title: '委案金额', title: '委案金额',
}, },
{ {
field: 'code', field: 'sumReductionAmount',
title: '累计减免金额', title: '累计减免金额',
}, },
{ {
field: 'code', field: 'sumRepayAmount',
title: '累计还款金额', title: '累计还款金额',
}, },
{ {
field: 'code', field: 'reduceAmount',
title: '剩余待还金额', 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 }, toolbarConfig: { enabled: false },
}); });
tabledata.value = [ const changeNum = (row) => {
{ name: 'admin', code: 'admin', role: 'superadmin', num: 1 }, row.payAmount = row.remainingAmount - row.reduceAmount;
{ name: 'account1', code: 'account1', role: 'user', num: 1 }, form.totalReduceAmount = 0;
{ name: 'account2', code: 'account2', role: 'user', num: 1 }, form.totalPayAmount = 0;
{ name: 'account3', code: 'account3', role: 'user', num: 1 }, tabledata.value.forEach((item) => {
]; form.totalReduceAmount += Number(item.reduceAmount) || 0;
const openModal = (account) => { form.totalPayAmount += Number(item.payAmount) || 0;
});
};
const openModal = (detail, caselist) => {
showModal.value = true; 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({ defineExpose({
openModal, openModal,
}); });
......
...@@ -27,18 +27,18 @@ ...@@ -27,18 +27,18 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item class="w-full" label="剩余待还总额:" prop="name"> <el-form-item class="w-full" label="剩余待还总额:" prop="name">
{{ form.sum }} {{ form.remainingAmount }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item class="w-full" label="还款总额:" prop="code"> <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-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item class="w-full" label="分期申请时间:" prop="code"> <el-form-item class="w-full" label="分期申请时间:" prop="code">
<el-date-picker <el-date-picker
v-model="form.datetime" v-model="form.applyDate"
class="w-full" class="w-full"
format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss"
type="datetime" type="datetime"
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item class="w-full" label="还款期数:" prop="name"> <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 <el-option
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.value"
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<el-form-item class="w-full" label="首期还款日:" prop="code"> <el-form-item class="w-full" label="首期还款日:" prop="code">
<el-date-picker <el-date-picker
class="w-full" class="w-full"
v-model="form.datetime" v-model="form.firstApplyDate"
format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss"
type="datetime" type="datetime"
/> />
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item class="w-full" label="分期生效时间:" prop="code"> <el-form-item class="w-full" label="分期生效时间:" prop="code">
<el-date-picker <el-date-picker
v-model="form.datetime" v-model="form.effectiveTime"
class="w-full" class="w-full"
format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss"
type="datetime" type="datetime"
...@@ -124,36 +124,38 @@ ...@@ -124,36 +124,38 @@
const splitdata = ref([]); const splitdata = ref([]);
const form = reactive({ const form = reactive({
sum: 0, remainingAmount: 0,
num: 0, totalRepayAmount: 0,
splitnum: 2, totalPeriod: 2,
datetime: dayjs().format('YYYY-MM-DD HH:mm:ss'), 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) => { const onHide = (done) => {
currentAccount.value = { people: 0, case: 0, money: 0 }; currentDetail.value = {};
done(); done();
}; };
const options = [ const options = [
{ {
value: 'Option1', value: '2',
label: 'Option1', label: '2',
}, },
{ {
value: 'Option2', value: '3',
label: 'Option2', label: '3',
}, },
{ {
value: 'Option3', value: '4',
label: 'Option3', label: '4',
}, },
{ {
value: 'Option4', value: '5',
label: 'Option4', label: '5',
}, },
{ {
value: 'Option5', value: '6',
label: 'Option5', label: '6',
}, },
]; ];
const selectdList = ref([]); const selectdList = ref([]);
...@@ -163,33 +165,33 @@ ...@@ -163,33 +165,33 @@
const config = reactive({ const config = reactive({
minHeight: 200, minHeight: 200,
columns: [ columns: [
{ type: 'checkbox', width: 50 }, // { type: 'checkbox', width: 50 },
{ {
field: 'code', field: 'caseId',
title: '案件ID', title: '案件ID',
}, },
{ {
field: 'code', field: 'product',
title: '产品', title: '产品',
}, },
{ {
field: 'code', field: 'payOrg',
title: '借款机构', title: '借款机构',
}, },
{ {
field: 'code', field: 'commissionAmount',
title: '委案金额', title: '委案金额',
}, },
{ {
field: 'code', field: 'sumReductionAmount',
title: '累计减免金额', title: '累计减免金额',
}, },
{ {
field: 'code', field: 'sumRepayAmount',
title: '累计还款金额', title: '累计还款金额',
}, },
{ {
field: 'code', field: 'remainingAmount',
title: '剩余待还金额', title: '剩余待还金额',
}, },
], ],
...@@ -243,9 +245,17 @@ ...@@ -243,9 +245,17 @@
{ name: 'account2', code: 'account2', role: 'user', num: 1 }, { name: 'account2', code: 'account2', role: 'user', num: 1 },
{ name: 'account3', code: 'account3', role: 'user', num: 1 }, { name: 'account3', code: 'account3', role: 'user', num: 1 },
]; ];
const openModal = (account) => { const openModal = (detail, caselist) => {
showModal.value = true; 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 = () => {}; const submitForm = () => {};
defineExpose({ defineExpose({
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
<vxe-grid <vxe-grid
v-bind="caseDetailConfig" v-bind="caseDetailConfig"
:show-footer="true" :show-footer="true"
:footer-method="footerMethod"
ref="caseDetailRef" ref="caseDetailRef"
@cell-click="onCellCase" @cell-click="onCellCase"
> >
...@@ -141,27 +142,6 @@ ...@@ -141,27 +142,6 @@
<div id="reducerecord"> <div id="reducerecord">
<div class="box-title">减免记录</div> <div class="box-title">减免记录</div>
<div class="box-content"> <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 <ProTable
:config="reduceConfig" :config="reduceConfig"
:data="reduceData" :data="reduceData"
...@@ -172,8 +152,8 @@ ...@@ -172,8 +152,8 @@
</div> </div>
<div id="splitrecord"> <div id="splitrecord">
<div class="box-title">分期记录</div> <div class="box-title">分期记录</div>
<div class="box-content"> <div class="box-content flex">
<table style="margin-bottom: 10px"> <!-- <table style="margin-bottom: 10px">
<tbody> <tbody>
<tr> <tr>
<td class="label">分期申请ID</td> <td class="label">分期申请ID</td>
...@@ -192,14 +172,23 @@ ...@@ -192,14 +172,23 @@
<td>johndoe@example.com</td> <td>johndoe@example.com</td>
</tr> </tr>
</tbody> </tbody>
<!-- Add more rows as needed --> </table> -->
</table> <div class="w-2/3">
<ProTable <ProTable
:config="recordConfig" :config="splitConfig"
:data="recordData" :data="splitData"
:showPagination="false" :showPagination="false"
:showToolBar="false" :showToolBar="false"
/> />
</div>
<div class="w-1/3 pl-3">
<ProTable
:config="splitDeConfig"
:data="splitDeData"
:showPagination="false"
:showToolBar="false"
/>
</div>
</div> </div>
</div> </div>
<div id="returnrecord"> <div id="returnrecord">
...@@ -224,17 +213,26 @@ ...@@ -224,17 +213,26 @@
<script setup lang="jsx" name="caseDetail"> <script setup lang="jsx" name="caseDetail">
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { reactive, ref, onBeforeMount } from 'vue'; import { reactive, ref, onBeforeMount, onMounted } from 'vue';
import { ElButton } from 'element-plus'; import { ElButton } from 'element-plus';
import repairModal from './components/repairModal.vue'; import repairModal from './components/repairModal.vue';
import returnModal from './components/returnModal.vue'; import returnModal from './components/returnModal.vue';
import reduceDrawer from './components/reduceDrawer.vue'; import reduceDrawer from './components/reduceDrawer.vue';
import splitDrawer from './components/splitDrawer.vue'; import splitDrawer from './components/splitDrawer.vue';
import callDrawer from './components/callDrawer.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 returnData = ref([]);
const recordData = ref([]); const recordData = ref([]);
const reduceData = ref([]); const reduceData = ref([]);
const splitData = ref([]);
const splitDeData = ref([]);
const detail = ref({ const detail = ref({
borrower: { borrower: {
guarantors: [], guarantors: [],
...@@ -243,11 +241,14 @@ ...@@ -243,11 +241,14 @@
const caseDetailRef = ref(); const caseDetailRef = ref();
const returnModalRef = ref(); const returnModalRef = ref();
const repairModalRef = ref(); const repairModalRef = ref();
const reduceTRef = ref();
const splitDrawerRef = ref(); const splitDrawerRef = ref();
const callDrawerRef = ref(); const callDrawerRef = ref();
const reduceDrawerRef = ref(); const reduceDrawerRef = ref();
const route = useRoute(); const route = useRoute();
const borrowerPara = reactive({
borrowerId: 'sss',
});
const activeStep = ref(2); const activeStep = ref(2);
const stepList = ref([ const stepList = ref([
{ title: '已分派', desc: 'sadas' }, { title: '已分派', desc: 'sadas' },
...@@ -260,38 +261,69 @@ ...@@ -260,38 +261,69 @@
JSON.parse(JSON.stringify(detail.value)) 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({ const returnConfig = reactive({
columns: [ columns: [
{ {
field: 'code', field: 'id',
title: '还款记录ID', title: '还款记录ID',
}, },
{ {
field: 'code', field: 'realRepayAmount',
title: '实际还款金额', title: '实际还款金额',
}, },
{ {
field: 'code', field: 'realRepayTime',
title: '实际还款时间', title: '实际还款时间',
}, },
{ {
field: 'code', field: 'reduce.id',
title: '关联减免ID', title: '关联减免ID',
}, },
{ {
field: 'code', field: 'stages.id',
title: '关联分期ID', title: '关联分期ID',
}, },
{ {
field: 'code', field: 'stages.totalPeriod',
title: '关联分期期次', title: '关联分期期次',
}, },
{ {
field: 'code', field: 'reduce.totalPayAmount',
title: '应还金额', title: '应还金额',
}, },
{ {
field: 'code', field: 'stages.loans.payOrg',
title: '借款机构', title: '借款机构',
}, },
], ],
...@@ -312,37 +344,49 @@ ...@@ -312,37 +344,49 @@
title: '下次跟进时间', title: '下次跟进时间',
}, },
{ {
field: 'code', field: 'guarantor.name',
title: '联系人姓名', title: '联系人姓名',
slots: {
default: ({ row }) => {
return <>{row?.credit?.borrower?.name}</>;
},
},
}, },
{ {
field: 'code', field: 'guarantor.phone',
title: '联系人号码', title: '联系人号码',
},
{
field: 'followStatus',
title: '拨打跟进结果',
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return <>{row?.credit?.borrower?.phone}</>; return (
<>
{row.followStatus
? followStatusOpt.find((v) => v.value === row.followStatus).label
: ''}
</>
);
}, },
}, },
}, },
{
field: 'code',
title: '拨打跟进结果',
},
{ {
field: 'phoneResultStatus', field: 'phoneResultStatus',
title: '拨打处置状态', title: '拨打处置状态',
slots: {
default: ({ row }) => {
return (
<>
{row.phoneResultStatus
? phoneResultStatusOpt.find((v) => v.value === row.phoneResultStatus).label
: ''}
</>
);
},
},
}, },
{ {
field: 'remark', field: 'remark',
title: '备注', title: '备注',
}, },
{ {
field: 'code', field: 'voices',
title: '通话录音', title: '通话录音',
}, },
{ {
...@@ -394,8 +438,12 @@ ...@@ -394,8 +438,12 @@
default: ({ row, rowIndex }) => { default: ({ row, rowIndex }) => {
return ( return (
<> <>
{/* <ElButton type="primary" onClick={() => callTelephone(row)} disabled={row.status !== 'Y'}> */} <ElButton
<ElButton type="primary" onClick={() => callTelephone(row)}> type="primary"
onClick={() => callTelephone(row)}
disabled={row.status !== 'Y'}
>
{/* <ElButton type="primary" onClick={() => callTelephone(row)}> */}
拨打跟进 拨打跟进
</ElButton> </ElButton>
</> </>
...@@ -413,40 +461,46 @@ ...@@ -413,40 +461,46 @@
repairModalRef.value.openModal(JSON.parse(JSON.stringify(detail.value))); repairModalRef.value.openModal(JSON.parse(JSON.stringify(detail.value)));
}; };
const reduce = () => { 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 = () => { 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({ const caseDetailConfig = reactive({
columns: [ columns: [
{ type: 'expand', width: 80, slots: { content: 'expand_content' } }, { type: 'expand', width: 80, slots: { content: 'expand_content' } },
{ {
field: 'id', field: 'caseId',
title: '案件ID', title: '案件ID',
}, },
{ {
field: 'code', field: 'product',
title: '产品', title: '产品',
}, },
{ {
field: 'code', field: 'payOrg',
title: '借款机构', title: '借款机构',
}, },
{ {
field: 'code', field: 'commissionAmount',
title: '案金额', title: '案金额',
}, },
{ {
field: 'code', field: 'sumReductionAmount',
title: '累计减免金额', title: '累计减免金额',
}, },
{ {
field: 'code', field: 'sumRepayAmount',
title: '累计还款金额', title: '累计还款金额',
}, },
{ {
field: 'code', field: 'remainingAmount',
title: '剩余待还金额', title: '剩余待还金额',
}, },
{ {
...@@ -465,30 +519,138 @@ ...@@ -465,30 +519,138 @@
}, },
}, },
], ],
data: [ data: [],
{ id: 10001, name: 'Test1', role: 'Develop', sex: 'Man', age: 28, address: 'test abc' }, toolbarConfig: { enabled: false },
{ id: 10002, name: 'Test2', role: 'Test', sex: 'Women', age: 22, address: 'Guangzhou' }, });
{ id: 10003, name: 'Test3', role: 'PM', sex: 'Man', age: 32, address: 'Shanghai' }, const onCellClick = ({ row, rowIndex }) => {
{ id: 10004, name: 'Test4', role: 'Designer', sex: 'Women', age: 24, address: 'Shanghai' }, 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 },
});
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 }, toolbarConfig: { enabled: false },
}); });
console.log('sada', detail.value?.borrower?.idCard); const getTrackRecordList = (borrowerId) => {
getTrackRecordPage(borrowerId).then((res) => {
const getTrackRecordList = (id) => { if (res.result && res.result) {
getTrackRecordPage({ recordData.value = res.result;
current: 1,
size: 9999999,
creditId: id,
}).then((res) => {
if (res.result && res.result.content) {
recordData.value = res.result.content;
} }
}); });
}; };
const onCellCase = ({ row, rowIndex }) => { const onCellCase = ({ row, rowIndex }) => {
getTrackRecordList(row.id); getTrackRecordList(row.borrower.id);
}; };
const anchor = (type) => { const anchor = (type) => {
document.querySelector(`#${type}`).scrollIntoView(true); document.querySelector(`#${type}`).scrollIntoView(true);
...@@ -503,50 +665,61 @@ ...@@ -503,50 +665,61 @@
const reduceConfig = reactive({ const reduceConfig = reactive({
columns: [ columns: [
{ {
field: 'code', field: 'caseId',
title: '跟进记录ID', title: '案件ID',
}, },
{ {
field: 'code', field: 'reduceAmount',
title: '跟进日期', title: '减免金额',
}, },
{ {
field: 'code', field: 'totalReduceAmount',
title: '下次跟进时间', title: '减免金额(总计)',
}, },
{ {
field: 'code', field: 'totalNumber',
title: '联系人姓名', title: '减免案件数',
}, },
{ {
field: 'code', field: 'remainingAmount',
title: '联系人号码', title: '剩余待还金额',
}, },
{ {
field: 'code', field: 'totalPayAmount',
title: '拨打跟进结果', title: '累计还款金额',
}, },
{ {
field: 'code', field: 'reduceType',
title: '拨打处置状态', title: '减免类型',
slots: {
default: ({ row }) => {
return (
<>{row.reduceType ? (row.reduceType === 'settle' ? '结清减免' : '分期减免') : ''}</>
);
},
},
}, },
{ {
field: 'code', field: 'id',
title: '备注', title: '减免申请ID',
}, },
{ {
field: 'code', field: 'applyDate',
title: '通话录音', title: '减免申请时间',
},
{
field: 'inEffectDate',
title: '减免生效时间',
}, },
{ {
field: 'code', field: 'code',
title: '微信图片附件', title: '操作',
slots: { slots: {
default: ({ row, rowIndex }) => { default: ({ row, rowIndex }) => {
return ( return (
<> <>
<ElButton type="primary" link onClick={() => callTelephone(row)}> <ElButton type="primary" link onClick={() => returnCrash(row)}>
下载 还款
</ElButton> </ElButton>
</> </>
); );
...@@ -556,32 +729,32 @@ ...@@ -556,32 +729,32 @@
], ],
toolbarConfig: { enabled: false }, 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 () => { onBeforeMount(async () => {
const id = JSON.parse(route.query.id); const id = JSON.parse(route.query.id);
const { result } = await getCredit(id); const { result } = await getCredit(id);
detail.value = result; detail.value = result;
console.log('resultresult', detail.value); if (detail.value?.borrower?.id) {
getTrackRecordList(detail.value?.id); getTrackRecordList(detail.value?.borrower?.id);
if (detail.value?.borrower?.idCard) { listByBorrower(detail.value?.borrower?.id).then((res) => {
getCreditPage({ current: 1, size: 99999999, idCard: detail.value?.borrower?.idCard }).then( if (res.result && res.result) {
(res) => { caseDetailConfig.data = res.result;
if (res.result && res.result.content) { }
caseDetailConfig.data = res.result.content; });
} 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> </script>
......
...@@ -29,102 +29,125 @@ ...@@ -29,102 +29,125 @@
import { onMounted } from 'vue'; import { onMounted } from 'vue';
const router = useRouter(); const router = useRouter();
const options = ref([]);
const onCellClick = ({ row, rowIndex }) => { const onCellClick = ({ row, rowIndex }) => {
router.push({ router.push({
path: '/property/case-detail', path: '/property/case-detail',
query: { id: row.id }, //这里不能直接写成 query: JSON.stringify(item) 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({ const config = reactive({
columns: [ columns: [
{ field: 'id', title: '案件ID', search: { el: 'input' }, width: 80 }, { field: 'caseId', title: '案件ID', search: { el: 'input' }, width: 80 },
{ {
field: 'code', field: 'payOrg',
title: '借款机构', title: '借款机构',
width: 100, width: 100,
search: { el: 'input', props: { clearable: true } }, search: { el: 'input', props: { clearable: true } },
}, },
{ {
field: 'code', field: 'manageOrg',
title: '资管公司', title: '资管公司',
width: 100, width: 100,
search: { el: 'input', props: { clearable: true } }, search: { el: 'input', props: { clearable: true } },
}, },
{ {
field: 'role', field: 'borrower.name',
title: '借款人姓名', title: '借款人姓名',
width: 120, width: 120,
search: { search: {
el: 'input', el: 'input',
key: 'borrower.name',
props: { clearable: true }, props: { clearable: true },
slots: {
default: ({ row }) => {
return <>{row?.borrower?.name}</>;
},
},
}, },
}, },
{ {
field: 'role', field: 'borrower.idCard',
title: '身份证', title: '身份证',
width: 140, width: 140,
search: { search: {
el: 'input', el: 'input',
props: { clearable: true }, props: { clearable: true },
slots: { key: 'borrower.idCard',
default: ({ row }) => {
return <>{row?.borrower?.idCard}</>;
},
},
}, },
}, },
{ {
field: 'role', field: 'borrower.phone',
title: '手机号', title: '手机号',
width: 140, width: 140,
search: { search: {
el: 'input', el: 'input',
props: { clearable: true }, props: { clearable: true },
slots: { key: 'borrower.phone',
default: ({ row }) => {
return <>{row?.borrower?.phone}</>;
},
},
}, },
}, },
{ {
field: 'loanAmount', field: 'commissionAmount',
title: '委案金额', title: '委案金额',
width: 80, width: 80,
search: { el: 'input', props: { clearable: true } }, search: { el: 'input', props: { clearable: true } },
}, },
{ {
field: 'role', field: 'sumRepayAmount',
title: '累计还款金额', title: '累计还款金额',
width: 110, width: 110,
search: { el: 'input', props: { clearable: true } }, search: { el: 'input', props: { clearable: true } },
}, },
{ {
field: 'role', field: 'sumReductionAmount',
title: '累计减免金额', title: '累计减免金额',
width: 110, width: 110,
search: { el: 'input', props: { clearable: true } }, search: { el: 'input', props: { clearable: true } },
}, },
{ {
field: 'role', field: 'remainingAmount',
title: '剩余待还金额', title: '剩余待还金额',
width: 110, width: 110,
search: { el: 'input', props: { clearable: true } }, search: { el: 'input', props: { clearable: true } },
}, },
{ {
field: 'role', field: 'cpe.username',
title: 'CPE', title: 'CPE',
width: 80, width: 80,
search: { el: 'input', props: { clearable: true } }, search: { el: 'input', props: { clearable: true }, key: 'cpe.username' },
}, },
{ {
field: 'role', field: 'cpeDate',
title: '分配CPE日期', title: '分配CPE日期',
width: 110, width: 110,
search: { el: 'date-picker', props: { type: 'date', valueFormat: 'YYYY-MM-DD' } }, search: { el: 'date-picker', props: { type: 'date', valueFormat: 'YYYY-MM-DD' } },
...@@ -148,28 +171,61 @@ ...@@ -148,28 +171,61 @@
search: { el: 'input', props: { clearable: true } }, search: { el: 'input', props: { clearable: true } },
}, },
{ {
field: 'role', field: 'followStatus',
title: '跟进结果', title: '跟进结果',
width: 80, width: 80,
enum: options, enum: followStatusOpt,
search: { el: 'select', props: { filterable: true }, span: 1 }, 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: '跟进状态', title: '跟进状态',
width: 80, width: 80,
enum: options, enum: phoneResultStatusOpt,
search: { el: 'select', props: { filterable: true }, span: 1 }, 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', field: 'creditStatus',
title: '案件状态', title: '案件状态',
width: 80, width: 80,
enum: options, enum: creditStatusOpt,
search: { el: 'select', props: { filterable: true }, span: 1 }, 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, onCellClick: onCellClick,
......
...@@ -55,7 +55,7 @@ export default defineConfig(({ command, mode }) => { ...@@ -55,7 +55,7 @@ export default defineConfig(({ command, mode }) => {
port: VITE_PORT, port: VITE_PORT,
proxy: { proxy: {
'/api': { '/api': {
target: 'http://8.152.205.9:8080', target: 'http://192.168.31.128:8080',
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''), 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