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

修改问题清单的bug

parent 6c87dac0
...@@ -44,7 +44,7 @@ export const fullBack = (params) => { ...@@ -44,7 +44,7 @@ export const fullBack = (params) => {
return request.get('/LoanDistribute/fullBack', params); return request.get('/LoanDistribute/fullBack', params);
}; };
// 留案 // 留案
export const stayLoan = (ids) => { export const stayLoan = (params) => {
return request.get('/LoanDistribute/stay', { ids }); return request.get('/LoanDistribute/stay', params);
}; };
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
return { return {
columns: [ columns: [
{ type: 'checkbox', width: 50 }, { type: 'checkbox', width: 50 },
{ type: 'expand', width: 80, slots: { content: 'expand_content' } }, { type: 'expand', width: 40, slots: { content: 'expand_content' } },
{ {
field: 'caseId', field: 'caseId',
title: '案件ID', title: '案件ID',
......
...@@ -166,11 +166,13 @@ ...@@ -166,11 +166,13 @@
{ type: 'checkbox', title: '', width: '40px' }, { type: 'checkbox', title: '', width: '40px' },
{ {
field: 'loan.caseId', field: 'loan.caseId',
width: 100,
showOverflow: 'tooltip', showOverflow: 'tooltip',
title: '案件ID', title: '案件ID',
}, },
{ {
field: 'loan.product', field: 'loan.product',
width: 100,
showOverflow: 'tooltip', showOverflow: 'tooltip',
title: '产品', title: '产品',
}, },
...@@ -178,25 +180,30 @@ ...@@ -178,25 +180,30 @@
field: 'loan.loanPlatform.name', field: 'loan.loanPlatform.name',
showOverflow: 'tooltip', showOverflow: 'tooltip',
title: '借款机构', title: '借款机构',
width: 90,
}, },
{ {
field: 'loan.commissionAmount', field: 'loan.commissionAmount',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 90,
title: '委案金额', title: '委案金额',
}, },
{ {
field: 'loan.sumReductionAmount', field: 'loan.sumReductionAmount',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 100,
title: '累计减免金额', title: '累计减免金额',
}, },
{ {
field: 'loan.sumRepayAmount', field: 'loan.sumRepayAmount',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 100,
title: '累计还款金额', title: '累计还款金额',
}, },
{ {
field: 'reduceAmount', field: 'reduceAmount',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 100,
title: '减免金额', title: '减免金额',
slots: { slots: {
default: ({ row, rowIndex }) => { default: ({ row, rowIndex }) => {
...@@ -211,11 +218,13 @@ ...@@ -211,11 +218,13 @@
{ {
field: 'loan.remainingAmount', field: 'loan.remainingAmount',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 166,
title: '剩余待还金额(减免前)', title: '剩余待还金额(减免前)',
}, },
{ {
field: 'payAmount', field: 'payAmount',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 140,
title: '应还金额(减免后)', title: '应还金额(减免后)',
}, },
], ],
......
...@@ -318,11 +318,13 @@ ...@@ -318,11 +318,13 @@
form.totalRepayAmount = 0; form.totalRepayAmount = 0;
form.remainingAmount = 0; form.remainingAmount = 0;
selectdList.value.forEach((item) => { selectdList.value.forEach((item) => {
const remainingAmount = Decimal(Number(item.remainingAmount) || 0).sub(Decimal(Number(item.sumReductionAmount) || 0))
form.totalRepayAmount = Decimal(form.totalRepayAmount).add( form.totalRepayAmount = Decimal(form.totalRepayAmount).add(
Decimal(Number(item.remainingAmount) || 0) Decimal(remainingAmount)
); );
form.remainingAmount = Decimal(form.remainingAmount).add( form.remainingAmount = Decimal(form.remainingAmount).add(
Decimal(Number(item.remainingAmount) || 0) Decimal(remainingAmount)
); );
}); });
if (selectdList.value.length > 0) { if (selectdList.value.length > 0) {
...@@ -339,11 +341,12 @@ ...@@ -339,11 +341,12 @@
form.totalRepayAmount = 0; form.totalRepayAmount = 0;
form.remainingAmount = 0; form.remainingAmount = 0;
selectdList.value.forEach((item) => { selectdList.value.forEach((item) => {
const remainingAmount = Decimal(Number(item.remainingAmount) || 0).sub(Decimal(Number(item.sumReductionAmount) || 0))
form.totalRepayAmount = Decimal(form.totalRepayAmount).add( form.totalRepayAmount = Decimal(form.totalRepayAmount).add(
Decimal(Number(item.remainingAmount) || 0) Decimal(remainingAmount)
); );
form.remainingAmount = Decimal(form.remainingAmount).add( form.remainingAmount = Decimal(form.remainingAmount).add(
Decimal(Number(item.remainingAmount) || 0) Decimal(remainingAmount)
); );
}); });
if (selectdList.value.length > 0) { if (selectdList.value.length > 0) {
...@@ -457,11 +460,12 @@ ...@@ -457,11 +460,12 @@
form.totalRepayAmount = 0; form.totalRepayAmount = 0;
form.remainingAmount = 0; form.remainingAmount = 0;
caselist.forEach((item) => { caselist.forEach((item) => {
const remainingAmount = Decimal(Number(item.remainingAmount) || 0).sub(Decimal(Number(item.sumReductionAmount) || 0))
form.totalRepayAmount = Decimal(form.totalRepayAmount).add( form.totalRepayAmount = Decimal(form.totalRepayAmount).add(
Decimal(Number(item.remainingAmount) || 0) Decimal(remainingAmount)
); );
form.remainingAmount = Decimal(form.remainingAmount).add( form.remainingAmount = Decimal(form.remainingAmount).add(
Decimal(Number(item.remainingAmount) || 0) Decimal(remainingAmount)
); );
}); });
tabledata.value = caselist; tabledata.value = caselist;
......
...@@ -191,7 +191,9 @@ ...@@ -191,7 +191,9 @@
:data="recordData" :data="recordData"
:showPagination="false" :showPagination="false"
:showToolBar="false" :showToolBar="false"
/> >
</ProTable>
</div> </div>
</div> </div>
</vxe-tab-pane> </vxe-tab-pane>
...@@ -204,7 +206,85 @@ ...@@ -204,7 +206,85 @@
:data="reduceData" :data="reduceData"
:showPagination="false" :showPagination="false"
:showToolBar="false" :showToolBar="false"
/> >
<template #expand_content="{ row }">
<div class="expand-box">
<div>案件明细</div>
<div class="expand-table">
<div v-for="(item, index) in row.reduceRecords" :key="index">
<div class="public-header">
{{ item?.loan?.caseId }}
</div>
<table
><tbody>
<tr>
<td class="label">案件ID</td>
<td>{{ item?.loan?.caseId }}</td>
<td class="label">借款机构</td>
<td>{{ item?.loan?.loanPlatform?.name }}</td>
<td class="label">资管公司</td>
<td>{{ item?.loan?.manageOrg.orgName }}</td>
</tr>
<tr>
<td class="label">身份证</td>
<td>{{ item?.loan?.borrower?.idCard }}</td>
<td class="label">手机号</td>
<td>{{ item?.loan?.borrower?.phone }}</td>
<td class="label">折扣</td>
<td>{{ item?.loan?.discount }}</td>
<td class="label">委案金额</td>
<td>{{ item?.loan?.commissionAmount }}</td>
</tr>
<tr>
<td class="label">累计还款金额</td>
<td>{{ item?.loan?.sumRepayAmount }}</td>
<td class="label">累计减免金额</td>
<td>{{ item?.loan?.sumReductionAmount }}</td>
<td class="label">剩余待还金额</td>
<td>{{ item?.loan?.remainingAmount }}</td>
</tr>
<tr>
<td class="label">CPE</td>
<td>{{ item?.loan?.cpe?.username }}</td>
<td class="label">分派CPE日期</td>
<td>{{ item?.loan?.cpeDate }}</td>
<td class="label">本金余额</td>
<td>{{ item?.loan?.principalBalance }}</td>
<td class="label">案件状态</td>
<td>
{{
item?.loan?.caseStatus
? caseStatusOpt.find((v) => v.value === item?.loan?.caseStatus).label
: ''
}}</td
>
</tr>
<tr>
<td class="label">欠息额</td>
<td>{{ item?.loan?.debitInterest }}</td>
<td class="label">手续费</td>
<td>{{ item?.loan?.commission }}</td>
<td class="label">跟进结果</td>
<td>{{
item?.loan?.followStatus
? followStatusOpt.find((v) => v.value === item?.loan?.followStatus).label
: ''
}}</td>
<td class="label">跟进状态</td>
<td>{{
item?.loan?.phoneResultStatus
? phoneResultStatusOpt.find((v) => v.value === item?.loan?.phoneResultStatus)
.label
: ''
}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</template>
</ProTable>
</div> </div>
</div> </div>
</vxe-tab-pane> </vxe-tab-pane>
...@@ -239,7 +319,97 @@ ...@@ -239,7 +319,97 @@
:data="splitData" :data="splitData"
:showPagination="false" :showPagination="false"
:showToolBar="false" :showToolBar="false"
/> >
<template #expand_content="{ row }">
<div class="expand-box">
<div class="flex">
<div class="w-full pr-2">
<div>案件明细</div>
<div class="expand-table">
<div v-for="(item, index) in row.loans" :key="index">
<div class="public-header">
{{ item?.caseId }}
</div>
<table
><tbody>
<tr>
<td class="label">案件ID</td>
<td>{{ item?.caseId }}</td>
<td class="label">借款机构</td>
<td>{{ item?.loanPlatform?.name }}</td>
</tr>
<tr>
<td class="label">资管公司</td>
<td>{{ item?.manageOrg.orgName }}</td>
<td class="label">身份证</td>
<td>{{ item?.borrower?.idCard }}</td>
</tr>
<tr>
<td class="label">手机号</td>
<td>{{ item?.borrower?.phone }}</td>
<td class="label">折扣</td>
<td>{{ item?.discount }}</td>
</tr>
<tr>
<td class="label">累计还款金额</td>
<td>{{ item?.sumRepayAmount }}</td>
<td class="label">累计减免金额</td>
<td>{{ item?.sumReductionAmount }}</td>
</tr>
<tr>
<td class="label">剩余待还金额</td>
<td>{{ item?.remainingAmount }}</td>
<td class="label">CPE</td>
<td>{{ item?.cpe?.username }}</td>
</tr>
<tr>
<td class="label">分派CPE日期</td>
<td>{{ item?.cpeDate }}</td>
<td class="label">本金余额</td>
<td>{{ item?.principalBalance }}</td>
</tr>
<tr>
<td class="label">欠息额</td>
<td>{{ item?.debitInterest }}</td>
<td class="label">手续费</td>
<td>{{ item?.commission }}</td>
</tr>
<tr>
<td class="label">委案金额</td>
<td>{{ item?.commissionAmount }}</td>
<td class="label">案件状态</td>
<td>
{{
item?.caseStatus
? caseStatusOpt.find((v) => v.value === item?.caseStatus).label
: ''
}}</td
>
</tr>
<tr>
<td class="label">跟进结果</td>
<td>{{
item?.followStatus
? followStatusOpt.find((v) => v.value === item?.followStatus).label
: ''
}}</td>
<td class="label">跟进状态</td>
<td>{{
item?.phoneResultStatus
? phoneResultStatusOpt.find((v) => v.value === item?.phoneResultStatus)
.label
: ''
}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</template>
</ProTable>
</div> </div>
<div class="w-1/3 pl-3"> <div class="w-1/3 pl-3">
<ProTable <ProTable
...@@ -756,6 +926,7 @@ ...@@ -756,6 +926,7 @@
const splitConfig = reactive({ const splitConfig = reactive({
columns: [ columns: [
{ type: 'expand', width: 40, slots: { content: 'expand_content' } },
{ {
field: 'caseId', field: 'caseId',
title: '案件ID', title: '案件ID',
...@@ -904,6 +1075,7 @@ ...@@ -904,6 +1075,7 @@
}; };
const reduceConfig = reactive({ const reduceConfig = reactive({
columns: [ columns: [
{ type: 'expand', width: 40, slots: { content: 'expand_content' } },
{ {
field: 'caseId', field: 'caseId',
title: '案件ID', title: '案件ID',
...@@ -927,6 +1099,7 @@ ...@@ -927,6 +1099,7 @@
{ {
field: 'totalReduceAmount', field: 'totalReduceAmount',
title: '减免金额(总计)', title: '减免金额(总计)',
width: 110,
showOverflow: 'tooltip', showOverflow: 'tooltip',
}, },
{ {
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { reactive, ref } from 'vue'; import { reactive, ref } from 'vue';
import { getCreditPage } from '@/api/property'; import { getCreditPage } from '@/api/property';
import { ElMessageBox, ElMessage } from 'element-plus';
const caseLRef = ref(); const caseLRef = ref();
import { stayLoan } from '@/api/allcation'; import { stayLoan } from '@/api/allcation';
import { onMounted } from 'vue'; import { onMounted } from 'vue';
...@@ -26,6 +27,7 @@ ...@@ -26,6 +27,7 @@
const { userInfo } = useUserStore(); const { userInfo } = useUserStore();
const router = useRouter(); const router = useRouter();
const selectdList = ref([]); const selectdList = ref([]);
const curParam = ref({});
const onCheckboxChange = (row) => { const onCheckboxChange = (row) => {
selectdList.value = row.records; selectdList.value = row.records;
}; };
...@@ -47,6 +49,7 @@ ...@@ -47,6 +49,7 @@
if (userInfo.id) { if (userInfo.id) {
obj['cpe'] = userInfo.id obj['cpe'] = userInfo.id
} }
curParam.value = obj;
return obj; return obj;
}; };
const stayCase = async () => { const stayCase = async () => {
...@@ -57,7 +60,14 @@ ...@@ -57,7 +60,14 @@
}); });
const ids = selectdList.value.map((v) => v.id).join(','); const ids = selectdList.value.map((v) => v.id).join(',');
await stayLoan(ids); let param = {
}
if (ids.length > 0) {
param['loanIds'] = ids
} else {
param = {...curParam.value}
}
await stayLoan(param);
ElMessage({ ElMessage({
type: 'success', type: 'success',
......
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