Commit b28dede8 authored by 沈翠玲's avatar 沈翠玲

修改bug

parent 106c74b0
......@@ -256,7 +256,7 @@
import dayjs from 'dayjs';
import { computed, inject } from 'vue';
import { reactive, ref } from 'vue';
import { ElInputNumber, ElMessage } from 'element-plus';
import { ElInputNumber, ElMessage, ElTag } from 'element-plus';
import { Upload, Download } from '@element-plus/icons-vue';
import { getAppEnvConfig } from '@/utils/env';
import { saveTrackRecord } from '@/api/property';
......@@ -426,34 +426,51 @@
},
},
},
{
field: 'mergerCase',
title: '是否共案处理',
showOverflow: 'tooltip',
width: 120,
slots: {
default: ({ row }) => {
return <ElTag>{row.mergerCase == 'Y' ? '是' : '否'}</ElTag>;
},
},
},
{
field: 'product',
width: 120,
showOverflow: 'tooltip',
title: '产品',
},
{
field: 'loanPlatform.name',
showOverflow: 'tooltip',
width: 120,
title: '借款平台',
},
{
field: 'commissionAmount',
showOverflow: 'tooltip',
width: 120,
title: '委案金额',
},
{
field: 'sumReductionAmount',
showOverflow: 'tooltip',
width: 120,
title: '累计减免金额',
},
{
field: 'sumRepayAmount',
showOverflow: 'tooltip',
width: 120,
title: '累计还款金额',
},
{
field: 'remainingAmount',
showOverflow: 'tooltip',
width: 120,
title: '剩余待还金额',
},
],
......
......@@ -491,6 +491,28 @@
width: 230,
showOverflow: 'tooltip',
},
{
field: 'mergerCase',
title: '是否共案处理',
showOverflow: 'tooltip',
width: 120,
slots: {
default: ({ row }) => {
return <ElTag>{row.mergerCase == 'Y' ? '是' : '否'}</ElTag>;
},
},
},
{
field: 'canStages',
title: '分期是否可修改',
showOverflow: 'tooltip',
width: 120,
slots: {
default: ({ row }) => {
return <ElTag>{row.canStages == 'Y' ? '是' : '否'}</ElTag>;
},
},
},
{
field: 'product',
title: '产品',
......
......@@ -97,14 +97,9 @@
form.totalNumber
}}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="w-full" label="应还金额:" prop="relation">
{{ form.remainingAmount }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="w-full" label="减免原因:" prop="code">
<el-input v-model="form.applyDate" />
<el-input v-model="form.reason" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -114,7 +109,12 @@
</el-col>
<el-col :span="12">
<el-form-item class="w-full" label="备注:" prop="code">
<el-input v-model="form.applyDate" />
<el-input v-model="form.remark" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="w-full" label="应还金额:" prop="relation">
{{ form.remainingAmount }}
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -200,7 +200,7 @@
import { computed } from 'vue';
import { reactive, ref } from 'vue';
import { saveReduce } from '@/api/property';
import { ElMessage } from 'element-plus';
import { ElMessage, ElTag } from 'element-plus';
import { Download, ZoomIn } from '@element-plus/icons-vue';
import { onMounted } from 'vue';
import { watch } from 'vue';
......@@ -222,6 +222,8 @@
const form = reactive({
totalReduceAmount: 0,
totalNumber: '',
reason: '',
remark: '',
images: [],
reduceType: 'settle',
commissionAmount: 0,
......@@ -336,6 +338,17 @@
},
}
},
{
field: 'mergerCase',
title: '是否共案处理',
showOverflow: 'tooltip',
width: 120,
slots: {
default: ({ row }) => {
return <ElTag>{row.loan.mergerCase == 'Y' ? '是' : '否'}</ElTag>;
},
},
},
{
field: 'loan.product',
width: 100,
......@@ -416,9 +429,12 @@
showModal.value = true;
currentDetail.value = detail;
form.totalReduceAmount = detail.totalReduceAmount;
form.remark = detail.remark;
form.reason = detail.reason;
form.remainingAmount = Decimal(detail.remainingAmount).sub(Decimal(detail.totalReduceAmount));
form.applyDate = detail.applyDate
const list = [];
form['commissionAmount'] = 0
form.images = detail.images
? detail.images.map((v) => ({
name: v.slice(v.lastIndexOf('/') + 1, v.length),
......@@ -434,7 +450,7 @@
setTimeout(() => {
if (ProTableRef.value.element) {
ProTableRef.value.element.setAllCheckboxRow(true);
selectdList.value = list;
selectdList.value = caselist;
}
}, 500);
};
......@@ -448,16 +464,15 @@
images = images.map((v) => {
return v.replace(envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/', '');
});
console.log('remainingAmount', form)
const params = {
borrower: currentDetail.value.borrower,
...currentDetail.value,
askForStatus: 'Pending',
flowStatus: type,
...form,
images: images.length > 0 ? images : null,
reduceRecords: list,
};
delete params.id;
delete params.cpe;
saveReduce(params).then((res) => {
if (res.success) {
ElMessage.success({
......
......@@ -126,9 +126,10 @@
showModal.value = true;
};
const submitForm = async (type) => {
const ids = selectdList.value.map((v) => v.id).join(',');
await repayRecordFlowStatusByIds({
ids: ids,
ids: (currentRow.value && currentRow.value.id) ? currentRow.value.id : ids,
flowStatus: type,
});
......
......@@ -256,7 +256,7 @@
import dayjs from 'dayjs';
import { computed, inject } from 'vue';
import { reactive, ref } from 'vue';
import { ElInputNumber, ElMessage } from 'element-plus';
import { ElInputNumber, ElMessage,ElTag } from 'element-plus';
import { Upload, Download } from '@element-plus/icons-vue';
import { getAppEnvConfig } from '@/utils/env';
import { saveTrackRecord } from '@/api/property';
......@@ -426,33 +426,50 @@
},
showOverflow: 'tooltip',
},
{
field: 'mergerCase',
title: '是否共案处理',
showOverflow: 'tooltip',
width: 120,
slots: {
default: ({ row }) => {
return <ElTag>{row.mergerCase == 'Y' ? '是' : '否'}</ElTag>;
},
},
},
{
field: 'product',
width: 120,
showOverflow: 'tooltip',
title: '产品',
},
{
field: 'loanPlatform.name',
width: 120,
showOverflow: 'tooltip',
title: '借款平台',
},
{
field: 'commissionAmount',
width: 120,
showOverflow: 'tooltip',
title: '委案金额',
},
{
field: 'sumReductionAmount',
showOverflow: 'tooltip',
width: 120,
title: '累计减免金额',
},
{
field: 'sumRepayAmount',
showOverflow: 'tooltip',
width: 120,
title: '累计还款金额',
},
{
field: 'remainingAmount',
width: 120,
showOverflow: 'tooltip',
title: '剩余待还金额',
},
......
......@@ -427,7 +427,7 @@
field: 'mergerCase',
title: '是否共案处理',
showOverflow: 'tooltip',
width: 100,
width: 120,
slots: {
default: ({ row }) => {
return <ElTag>{row.mergerCase == 'Y' ? '是' : '否'}</ElTag>;
......@@ -437,31 +437,37 @@
{
field: 'product',
title: '产品',
width: 120,
showOverflow: 'tooltip',
},
{
field: 'loanPlatform.name',
title: '借款平台',
width: 120,
showOverflow: 'tooltip',
},
{
field: 'commissionAmount',
title: '委案金额',
width: 120,
showOverflow: 'tooltip',
},
{
field: 'sumReductionAmount',
title: '累计减免金额',
width: 120,
showOverflow: 'tooltip',
},
{
field: 'sumRepayAmount',
title: '累计还款金额',
width: 120,
showOverflow: 'tooltip',
},
{
field: 'remainingAmount',
title: '剩余待还金额',
width: 120,
showOverflow: 'tooltip',
},
],
......
......@@ -2,12 +2,13 @@
<el-drawer
v-model="showModal"
title="减免申请"
class="overflow-hidden1"
:size="800"
@close="showModal = false"
direction="rtl"
:before-close="onHide"
>
<div class="h-full overflow-auto flex-col flex mydrawer">
<div class="h-full overflow-hidden flex-col flex mydrawer">
<el-form
ref="formRef"
inline
......@@ -17,6 +18,16 @@
label-position="left"
>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item class="w-full" label="姓名:" prop="name" label-width="120px">
{{ currentDetail?.borrower?.name }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="w-full" label="证件号:" prop="name" label-width="120px">
{{ currentDetail?.borrower?.idCard }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="w-full" label="减免截止时间:" prop="code">
<el-date-picker v-model="form.applyDate" type="datetime" />
......@@ -37,6 +48,21 @@
form.totalNumber
}}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="w-full" label="减免原因:" prop="code">
<el-input v-model="form.reason"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="w-full" label="委案金额:" prop="relation">
{{ form.commissionAmount }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="w-full" label="备注:" prop="code">
<el-input v-model="form.remark"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="w-full" label="应还金额:" prop="relation">
<div>
......@@ -149,7 +175,10 @@
totalNumber: '',
images: [],
reduceType: 'settle',
reason: '',
remark: '',
remainingAmount: 0,
commissionAmount: 0,
applyDate: dayjs().format('YYYY-MM-DD HH:mm:ss'),
});
const props = defineProps({
......@@ -161,6 +190,7 @@
form.totalNumber = row.records.length;
form.totalReduceAmount = 0;
form.remainingAmount = 0;
form['commissionAmount'] = 0
selectdList.value.forEach((item) => {
form.totalReduceAmount = Decimal(form.totalReduceAmount).add(
Decimal(Number(item.reduceAmount) || 0)
......@@ -168,6 +198,7 @@
form.remainingAmount = Decimal(form.remainingAmount).add(
Decimal(Number(item.payAmount) || 0)
);
form['commissionAmount'] = Decimal(form['commissionAmount']).add(Decimal(item?.loan?.commissionAmount))
});
};
const handlePictureCardPreview = (uploadFile) => {
......@@ -176,7 +207,6 @@
};
// 判断文件类型,图片预览,文件下载
const updataIf = (e) => {
console.log('eeee', e)
if (e.fileName) {
if (e.fileName.split('.')[1] === 'png' || e.fileName.split('.')[1] === 'jpeg' || e.fileName.split('.')[1] === 'jpg') {
return false
......@@ -218,6 +248,7 @@
}
form.totalReduceAmount = 0;
form.remainingAmount = 0;
form.commissionAmount = 0;
selectdList.value.forEach((item) => {
form.totalReduceAmount = Decimal(form.totalReduceAmount).add(
Decimal(Number(item.reduceAmount) || 0)
......@@ -225,6 +256,7 @@
form.remainingAmount = Decimal(form.remainingAmount).add(
Decimal(Number(item.payAmount) || 0)
);
form['commissionAmount'] = Decimal(form['commissionAmount']).add(Decimal(item?.loan?.commissionAmount))
});
};
const currentDetail = ref({});
......@@ -264,7 +296,7 @@
field: 'mergerCase',
title: '是否共案处理',
showOverflow: 'tooltip',
width: 100,
width: 120,
slots: {
default: ({ row }) => {
return <ElTag>{row.loan.mergerCase == 'Y' ? '是' : '否'}</ElTag>;
......@@ -351,6 +383,9 @@
currentDetail.value = detail;
console.log('currentDetail', currentDetail.value, caselist);
form.totalReduceAmount = 0;
form.commissionAmount = 0;
form.remark = ''
form.reason = ''
form.remainingAmount = 0;
const list = [];
form.images = [];
......@@ -361,6 +396,7 @@
form.totalReduceAmount = Decimal(form.totalReduceAmount).add(
Decimal(Number(item.reduceAmount) || 0)
);
form['commissionAmount'] = Decimal(form['commissionAmount']).add(Decimal(item.commissionAmount))
form.remainingAmount = Decimal(form.remainingAmount).add(Decimal(payAmount));
});
tabledata.value = list;
......@@ -428,4 +464,4 @@
font-size: 12px;
}
}
</style>
</style>
\ No newline at end of file
......@@ -216,19 +216,18 @@
});
const radio = ref(0);
const validaterealRepayAmount = (rule, value, callback) => {
if (
Number(value) !== Number(Decimal(currentInfo.value.remainingAmount).sub(currentInfo.value.totalReduceAmount)) &&
currentType.value === '结清减免还款'
if (currentType.value === '结清减免还款' &&
Number(value) !== Number(Decimal(currentInfo.value.remainingAmount).sub(currentInfo.value.totalReduceAmount))
) {
callback(new Error('*金额必须等于应还金额'));
} else if (
Number(value) > Number(currentInfo.value.remainingAmount) &&
currentType.value === '直接还款'
currentType.value === '直接还款' &&
Number(value) > Number(currentInfo.value.remainingAmount)
) {
callback(new Error('*金额必须小于应还金额'));
} else if (
Number(value) !== Number(currentInfo.value.applyAmount) &&
currentType.value === '分期还款'
currentType.value === '分期还款' &&
Number(value) !== Number(currentInfo.value.applyAmount)
) {
callback(new Error('*金额必须等于应还金额'));
} else {
......
......@@ -425,31 +425,37 @@
{
field: 'product',
title: '产品',
width: 120,
showOverflow: 'tooltip',
},
{
field: 'loanPlatform.name',
title: '借款平台',
width: 120,
showOverflow: 'tooltip',
},
{
field: 'commissionAmount',
title: '委案金额',
width: 120,
showOverflow: 'tooltip',
},
{
field: 'sumReductionAmount',
title: '累计减免金额',
width: 120,
showOverflow: 'tooltip',
},
{
field: 'sumRepayAmount',
title: '累计还款金额',
width: 120,
showOverflow: 'tooltip',
},
{
field: 'remainingAmount',
title: '剩余待还金额',
width: 120,
showOverflow: 'tooltip',
},
],
......
......@@ -259,15 +259,6 @@
},
},
},
{
field: 'code',
title: '资产类型',
enum: options,
width: 100,
showOverflow: 'tooltip',
search: { el: 'select', props: { filterable: true } },
fieldNames: { label: 'genderLabel', value: 'genderValue' },
},
{
field: 'totalCaseNum',
showOverflow: 'tooltip',
......
......@@ -50,6 +50,7 @@
import { getTenantPage } from '@/api/tenant';
import citydata from '../../../assets/citydata';
import { getPlatformPage } from '@/api/platform';
import { VxeTextEllipsis, VxeTooltip } from 'vxe-pc-ui';
const uploadRef = ref();
......@@ -160,6 +161,7 @@
{
field: 'loanPlatform.name',
showOverflow: 'tooltip',
visible: false,
enum: () => getPlatformPage({ current: 1, size: 999999999, status: 'enable' }),
search: { el: 'select', props: { filterable: true }, key: 'loanPlatform', labelWidth: 105 },
fieldNames: { label: 'name', value: 'id' },
......@@ -169,6 +171,7 @@
{
field: 'commissionAmount',
title: '委案金额',
visible: false,
showOverflow: 'tooltip',
width: 80,
search: { render: ({ searchParam }) => {
......@@ -182,7 +185,7 @@
}, props: { clearable: true }, labelWidth: 105 },
},
{
field: 'age',
field: 'borrower.age',
title: '年龄',
showOverflow: 'tooltip',
width: 80,
......@@ -231,6 +234,7 @@
title: '时间',
showOverflow: 'tooltip',
width: 130,
visible: false,
search: {
el: 'date-picker',
props: { type: 'daterange', valueFormat: 'YYYY-MM-DD' },
......@@ -249,18 +253,6 @@
// labelWidth: 105,
// },
},
{
field: 'newName',
title: '联系人姓名',
showOverflow: 'tooltip',
width: 140,
search: {
el: 'input',
props: { clearable: true },
key: 'name',
labelWidth: 105,
},
},
{
field: 'oldPhone',
title: '修复前联系方式',
......@@ -299,19 +291,19 @@
);
},
},
{
title: 'CPE',
showOverflow: 'tooltip',
width: 60,
slots: {
default: ({ row }) => {
return (
<>{row.cpe?.username}</>
);
},
},
search: { el: 'input', props: { clearable: true }, key: 'cpeName', labelWidth: 105 },
},
// {
// title: 'CPE',
// showOverflow: 'tooltip',
// width: 60,
// slots: {
// default: ({ row }) => {
// return (
// <>{row.cpe?.username}</>
// );
// },
// },
// search: { el: 'input', props: { clearable: true }, key: 'cpeName', labelWidth: 105 },
// },
{
showOverflow: 'tooltip',
slots: {
......
......@@ -256,7 +256,7 @@
import dayjs from 'dayjs';
import { computed, inject } from 'vue';
import { reactive, ref } from 'vue';
import { ElInputNumber, ElMessage } from 'element-plus';
import { ElInputNumber, ElMessage, ElTag } from 'element-plus';
import { Upload, Download } from '@element-plus/icons-vue';
import { getAppEnvConfig } from '@/utils/env';
import { saveTrackRecord } from '@/api/property';
......@@ -433,34 +433,51 @@
},
showOverflow: 'tooltip',
},
{
field: 'mergerCase',
title: '是否共案处理',
showOverflow: 'tooltip',
width: 120,
slots: {
default: ({ row }) => {
return <ElTag>{row.mergerCase == 'Y' ? '是' : '否'}</ElTag>;
},
},
},
{
field: 'product',
width: 120,
showOverflow: 'tooltip',
title: '产品',
},
{
field: 'loanPlatform.name',
showOverflow: 'tooltip',
width: 120,
title: '借款平台',
},
{
field: 'commissionAmount',
showOverflow: 'tooltip',
width: 120,
title: '委案金额',
},
{
field: 'sumReductionAmount',
showOverflow: 'tooltip',
width: 120,
title: '累计减免金额',
},
{
field: 'sumRepayAmount',
showOverflow: 'tooltip',
width: 120,
title: '累计还款金额',
},
{
field: 'remainingAmount',
showOverflow: 'tooltip',
width: 120,
title: '剩余待还金额',
},
],
......
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