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;
......
This diff is collapsed.
...@@ -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