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: 'Option3',
label: 'Option3',
value: 'settle',
label: '结清减免',
},
{
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({
......
This diff is collapsed.
......@@ -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