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

修改问题清单的bug

parent 6c87dac0
......@@ -44,7 +44,7 @@ export const fullBack = (params) => {
return request.get('/LoanDistribute/fullBack', params);
};
// 留案
export const stayLoan = (ids) => {
return request.get('/LoanDistribute/stay', { ids });
export const stayLoan = (params) => {
return request.get('/LoanDistribute/stay', params);
};
......@@ -198,7 +198,7 @@
return {
columns: [
{ type: 'checkbox', width: 50 },
{ type: 'expand', width: 80, slots: { content: 'expand_content' } },
{ type: 'expand', width: 40, slots: { content: 'expand_content' } },
{
field: 'caseId',
title: '案件ID',
......
......@@ -166,11 +166,13 @@
{ type: 'checkbox', title: '', width: '40px' },
{
field: 'loan.caseId',
width: 100,
showOverflow: 'tooltip',
title: '案件ID',
},
{
field: 'loan.product',
width: 100,
showOverflow: 'tooltip',
title: '产品',
},
......@@ -178,25 +180,30 @@
field: 'loan.loanPlatform.name',
showOverflow: 'tooltip',
title: '借款机构',
width: 90,
},
{
field: 'loan.commissionAmount',
showOverflow: 'tooltip',
width: 90,
title: '委案金额',
},
{
field: 'loan.sumReductionAmount',
showOverflow: 'tooltip',
width: 100,
title: '累计减免金额',
},
{
field: 'loan.sumRepayAmount',
showOverflow: 'tooltip',
width: 100,
title: '累计还款金额',
},
{
field: 'reduceAmount',
showOverflow: 'tooltip',
width: 100,
title: '减免金额',
slots: {
default: ({ row, rowIndex }) => {
......@@ -211,11 +218,13 @@
{
field: 'loan.remainingAmount',
showOverflow: 'tooltip',
width: 166,
title: '剩余待还金额(减免前)',
},
{
field: 'payAmount',
showOverflow: 'tooltip',
width: 140,
title: '应还金额(减免后)',
},
],
......
......@@ -318,11 +318,13 @@
form.totalRepayAmount = 0;
form.remainingAmount = 0;
selectdList.value.forEach((item) => {
const remainingAmount = Decimal(Number(item.remainingAmount) || 0).sub(Decimal(Number(item.sumReductionAmount) || 0))
form.totalRepayAmount = Decimal(form.totalRepayAmount).add(
Decimal(Number(item.remainingAmount) || 0)
Decimal(remainingAmount)
);
form.remainingAmount = Decimal(form.remainingAmount).add(
Decimal(Number(item.remainingAmount) || 0)
Decimal(remainingAmount)
);
});
if (selectdList.value.length > 0) {
......@@ -339,11 +341,12 @@
form.totalRepayAmount = 0;
form.remainingAmount = 0;
selectdList.value.forEach((item) => {
const remainingAmount = Decimal(Number(item.remainingAmount) || 0).sub(Decimal(Number(item.sumReductionAmount) || 0))
form.totalRepayAmount = Decimal(form.totalRepayAmount).add(
Decimal(Number(item.remainingAmount) || 0)
Decimal(remainingAmount)
);
form.remainingAmount = Decimal(form.remainingAmount).add(
Decimal(Number(item.remainingAmount) || 0)
Decimal(remainingAmount)
);
});
if (selectdList.value.length > 0) {
......@@ -457,11 +460,12 @@
form.totalRepayAmount = 0;
form.remainingAmount = 0;
caselist.forEach((item) => {
const remainingAmount = Decimal(Number(item.remainingAmount) || 0).sub(Decimal(Number(item.sumReductionAmount) || 0))
form.totalRepayAmount = Decimal(form.totalRepayAmount).add(
Decimal(Number(item.remainingAmount) || 0)
Decimal(remainingAmount)
);
form.remainingAmount = Decimal(form.remainingAmount).add(
Decimal(Number(item.remainingAmount) || 0)
Decimal(remainingAmount)
);
});
tabledata.value = caselist;
......
This diff is collapsed.
......@@ -19,6 +19,7 @@
import { useRouter } from 'vue-router';
import { reactive, ref } from 'vue';
import { getCreditPage } from '@/api/property';
import { ElMessageBox, ElMessage } from 'element-plus';
const caseLRef = ref();
import { stayLoan } from '@/api/allcation';
import { onMounted } from 'vue';
......@@ -26,6 +27,7 @@
const { userInfo } = useUserStore();
const router = useRouter();
const selectdList = ref([]);
const curParam = ref({});
const onCheckboxChange = (row) => {
selectdList.value = row.records;
};
......@@ -47,6 +49,7 @@
if (userInfo.id) {
obj['cpe'] = userInfo.id
}
curParam.value = obj;
return obj;
};
const stayCase = async () => {
......@@ -57,7 +60,14 @@
});
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({
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