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

案件回收和案件撤案

parent 140521ef
......@@ -39,3 +39,8 @@ export const withdraw = (ids) => {
export const fullWithdraw = (ids) => {
return request.get('/LoanDistribute/fullWithdraw', { ids });
};
// 留案
export const stayLoan = (ids) => {
return request.get('/LoanDistribute/stay', { ids });
};
......@@ -258,3 +258,18 @@
padding: 15px 20px;
}
}
.vxe-tabs .vxe-tabs-header--item-inner, .vxe-tabs .vxe-tabs-header--wrapper {
height: 32px !important;
font-size: 14px;
}
.vxe-header--row {
.vxe-cell {
text-align: center !important;
}
.vxe-cell--title {
font-size: 13px !important;
}
}
.vxe-body--row.row--current, .vxe-body--row.row--hover {
background-color: var(--el-color-primary-light-9) !important;
}
\ No newline at end of file
......@@ -12,19 +12,19 @@
<p class="font-bold mb-2">联系人信息:</p>
<div class="flex justify-between">
<div>
<span class="text-gray-400">姓名</span>
<span class="text-gray-400">姓名</span>
<span>{{ currentInfo.guarantor.name }}</span>
</div>
<div>
<span class="text-gray-400">与案人关系</span>
<span class="text-gray-400">与案人关系</span>
<span>{{ currentInfo.guarantor.kinship }}</span>
</div>
<div>
<span class="text-gray-400">联系号码</span>
<span class="text-gray-400">联系号码</span>
<span>{{ currentInfo.guarantor.phone }}</span>
</div>
<div>
<span class="text-gray-400">号码状态</span>
<span class="text-gray-400">号码状态</span>
<span>
<el-radio-group v-model="currentInfo.guarantor.status" disabled>
<el-radio value="N">无效</el-radio>
......
......@@ -315,6 +315,7 @@
field: 'status',
title: '超时状态',
width: 100,
showOverflow: 'tooltip',
search: { el: 'select', props: { clearable: true } },
slots: {
default: ({ row }) => {
......@@ -432,7 +433,7 @@
padding: 8px;
width: 240px;
&.label {
background: #f5f7f9;
background: var(--el-color-primary-light-9);
}
}
}
......
......@@ -21,51 +21,51 @@
<table v-for="(item, index) in row.loans" :key="index"
><tbody>
<tr>
<td class="label">案件ID</td>
<td class="label">案件ID</td>
<td>{{ item?.caseId }}</td>
<td class="label">借款机构</td>
<td class="label">借款机构</td>
<td>{{ item?.loanPlatform?.name }}</td>
</tr>
<tr>
<td class="label">资管公司</td>
<td class="label">资管公司</td>
<td>{{ item?.manageOrg.orgName }}</td>
<td class="label">身份证</td>
<td class="label">身份证</td>
<td>{{ item?.borrower?.idCard }}</td>
</tr>
<tr>
<td class="label">手机号</td>
<td class="label">手机号</td>
<td>{{ item?.borrower?.phone }}</td>
<td class="label">折扣</td>
<td class="label">折扣</td>
<td>{{ item?.discount }}</td>
</tr>
<tr>
<td class="label">累计还款金额</td>
<td class="label">累计还款金额</td>
<td>{{ item?.sumRepayAmount }}</td>
<td class="label">累计减免金额</td>
<td class="label">累计减免金额</td>
<td>{{ item?.sumReductionAmount }}</td>
</tr>
<tr>
<td class="label">剩余待还金额</td>
<td class="label">剩余待还金额</td>
<td>{{ item?.remainingAmount }}</td>
<td class="label">CPE</td>
<td>{{ item?.cpe.username }}</td>
<td class="label">CPE</td>
<td>{{ item?.cpe?.username }}</td>
</tr>
<tr>
<td class="label">分派CPE日期</td>
<td class="label">分派CPE日期</td>
<td>{{ item?.cpeDate }}</td>
<td class="label">本金余额</td>
<td class="label">本金余额</td>
<td>{{ item?.principalBalance }}</td>
</tr>
<tr>
<td class="label">欠息额</td>
<td class="label">欠息额</td>
<td>{{ item?.debitInterest }}</td>
<td class="label">手续费</td>
<td class="label">手续费</td>
<td>{{ item?.commission }}</td>
</tr>
<tr>
<td class="label">委案金额</td>
<td class="label">委案金额</td>
<td>{{ item?.commissionAmount }}</td>
<td class="label">案件状态</td>
<td class="label">案件状态</td>
<td>
{{
item?.caseStatus
......@@ -75,13 +75,13 @@
>
</tr>
<tr>
<td class="label">跟进结果</td>
<td class="label">跟进结果</td>
<td>{{
item?.followStatus
? followStatusOpt.find((v) => v.value === item?.followStatus).label
: ''
}}</td>
<td class="label">跟进状态</td>
<td class="label">跟进状态</td>
<td>{{
item?.phoneResultStatus
? phoneResultStatusOpt.find((v) => v.value === item?.phoneResultStatus)
......@@ -96,24 +96,12 @@
<div class="flex-1">
<div>分期明细</div>
<div class="expand-table">
<table v-for="(item, index) in row.byStagesRecords" :key="index"
><tbody>
<tr>
<td class="label">期次:</td>
<td>{{ item?.period }}</td>
<td class="label">期次还款到期日:</td>
<td>{{ item?.playApplyDate }}</td>
</tr>
<tr>
<td class="label">期次还款状态:</td>
<td>{{
item.repayStatus ? (item.repayStatus === 'over' ? '已还款' : '待还款') : ''
}}</td>
<td class="label">期次应还金额:</td>
<td>{{ item.applyAmount }}</td>
</tr>
</tbody>
</table>
<ProTable
:config="splitDeConfig"
:data="row.byStagesRecords"
:showPagination="false"
:showToolBar="false"
/>
</div>
</div>
</div>
......@@ -176,6 +164,36 @@
label: '6',
},
];
const splitDeConfig = reactive({
columns: [
{
field: 'period',
title: '期次',
showOverflow: 'tooltip',
},
{
field: 'playApplyDate',
title: '到期日',
showOverflow: 'tooltip',
},
{
field: 'repayStatus',
title: '状态',
showOverflow: 'tooltip',
slots: {
default: ({ row }) => {
return <>{row.repayStatus ? (row.repayStatus === 'over' ? '已还款' : '待还款') : ''}</>;
},
},
},
{
field: 'applyAmount',
title: '期次应还金额',
showOverflow: 'tooltip',
}
],
toolbarConfig: { enabled: false },
});
const flowStatusOpt = [
{ label: '待审核', value: 'pending' },
{ label: '通过', value: 'pass' },
......@@ -373,7 +391,7 @@
padding: 8px;
width: 240px;
&.label {
background: #f5f7f9;
background: var(--el-color-primary-light-9);
}
}
}
......
......@@ -19,39 +19,39 @@
<table v-for="(item, index) in row.reduceRecords" :key="index"
><tbody>
<tr>
<td class="label">案件ID</td>
<td class="label">案件ID</td>
<td>{{ item?.loan?.caseId }}</td>
<td class="label">借款机构</td>
<td class="label">借款机构</td>
<td>{{ item?.loan?.loanPlatform?.name }}</td>
<td class="label">资管公司</td>
<td class="label">资管公司</td>
<td>{{ item?.loan?.manageOrg.orgName }}</td>
</tr>
<tr>
<td class="label">身份证</td>
<td class="label">身份证</td>
<td>{{ item?.loan?.borrower?.idCard }}</td>
<td class="label">手机号</td>
<td class="label">手机号</td>
<td>{{ item?.loan?.borrower?.phone }}</td>
<td class="label">折扣</td>
<td class="label">折扣</td>
<td>{{ item?.loan?.discount }}</td>
<td class="label">委案金额</td>
<td class="label">委案金额</td>
<td>{{ item?.loan?.commissionAmount }}</td>
</tr>
<tr>
<td class="label">累计还款金额</td>
<td class="label">累计还款金额</td>
<td>{{ item?.loan?.sumRepayAmount }}</td>
<td class="label">累计减免金额</td>
<td class="label">累计减免金额</td>
<td>{{ item?.loan?.sumReductionAmount }}</td>
<td class="label">剩余待还金额</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 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 class="label">本金余额</td>
<td>{{ item?.loan?.principalBalance }}</td>
<td class="label">案件状态</td>
<td class="label">案件状态</td>
<td>
{{
item?.loan?.caseStatus
......@@ -61,17 +61,17 @@
>
</tr>
<tr>
<td class="label">欠息额</td>
<td class="label">欠息额</td>
<td>{{ item?.loan?.debitInterest }}</td>
<td class="label">手续费</td>
<td class="label">手续费</td>
<td>{{ item?.loan?.commission }}</td>
<td class="label">跟进结果</td>
<td class="label">跟进结果</td>
<td>{{
item?.loan?.followStatus
? followStatusOpt.find((v) => v.value === item?.loan?.followStatus).label
: ''
}}</td>
<td class="label">跟进状态</td>
<td class="label">跟进状态</td>
<td>{{
item?.loan?.phoneResultStatus
? phoneResultStatusOpt.find((v) => v.value === item?.loan?.phoneResultStatus)
......@@ -194,7 +194,7 @@
search: { el: 'input', labelWidth: 80 },
slots: {
default: ({ row }) => {
return <>{row.reduceRecords.map((v) => v.loan.caseId).join(',')}</>;
return <>{Array.from(new Set(row.reduceRecords.map((v) => v.loan.caseId))).join(',')}</>;
},
},
width: 120,
......@@ -321,7 +321,7 @@
padding: 8px;
width: 240px;
&.label {
background: #f5f7f9;
background: var(--el-color-primary-light-9);
}
}
}
......
......@@ -93,6 +93,17 @@
showOverflow: 'tooltip',
title: '案件ID',
search: { el: 'input', labelWidth: 80 },
slots: {
default: ({ row }) => {
if (row.reduce && row.reduce.reduceRecords) {
return <>{Array.from(new Set(row.reduce.reduceRecords.map((v) => v.loan.caseId))).join(',')}</>;
} else if (row.stages && row.stages.loans) {
return <>{Array.from(new Set(row.stages.loans.map((v) => v.caseId))).join(',')}</>;
} else {
return <>{row.loan?.caseId}</>
}
},
},
width: 80,
},
{
......
......@@ -321,6 +321,7 @@
field: 'status',
title: '超时状态',
width: 100,
showOverflow: 'tooltip',
search: { el: 'select', props: { clearable: true }, labelWidth: 78 },
slots: {
default: ({ row }) => {
......
......@@ -144,24 +144,28 @@
{
field: 'loanPlatform.name',
title: '借款机构',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, key: 'payOrg', labelWidth: 78 },
},
{
field: 'manageOrg.orgName',
title: '资管公司',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, key: 'manageOrg', labelWidth: 78 },
},
{
field: 'batchCode',
title: '导入批次',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, key: 'batchCode', labelWidth: 78 },
},
{
field: 'distributeStatus',
title: '分派状态',
showOverflow: 'tooltip',
width: 80,
enum: distributeStatusOpt,
search: { el: 'select', props: { filterable: true }, labelWidth: 78 },
......@@ -181,23 +185,27 @@
{
field: 'tenant.name',
title: '调解中心',
showOverflow: 'tooltip',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 78 },
},
{
field: 'discount',
title: '折扣',
showOverflow: 'tooltip',
width: 80,
},
{
field: 'cpe.name',
title: 'CPE',
showOverflow: 'tooltip',
width: 60,
search: { el: 'input', props: { clearable: true }, key: 'cpeName', labelWidth: 78 },
},
{
field: 'tenantTime',
title: '分派中心日期',
showOverflow: 'tooltip',
width: 130,
search: {
el: 'date-picker',
......@@ -208,12 +216,14 @@
{
field: 'commissionAmount',
title: '债权总额',
showOverflow: 'tooltip',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 78 },
},
{
field: 'cpeDate',
title: '分派CPE日期',
showOverflow: 'tooltip',
width: 130,
search: {
el: 'date-picker',
......@@ -224,17 +234,20 @@
{
field: 'borrower.name',
title: '借款人姓名',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', key: 'borrowerName', props: { clearable: true }, labelWidth: 78 },
},
{
field: 'sumRepayAmount',
title: '已还总额',
showOverflow: 'tooltip',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 78 },
},
{
field: 'borrower.idCard',
showOverflow: 'tooltip',
title: '身份证',
width: 140,
search: { el: 'input', props: { clearable: true }, key: 'idCard', labelWidth: 78 },
......@@ -242,6 +255,7 @@
{
field: 'borrower.phone',
key: 'borrowerPhone',
showOverflow: 'tooltip',
title: '手机',
width: 100,
search: { el: 'input', props: { clearable: true }, labelWidth: 78 },
......@@ -249,15 +263,18 @@
{
field: 'principalBalance',
title: '剩余本金',
showOverflow: 'tooltip',
width: 80,
},
{
field: 'remaininginterest',
title: '剩余利息',
showOverflow: 'tooltip',
width: 80,
},
{
field: 'commission',
showOverflow: 'tooltip',
title: '违约金',
width: 80,
},
......
......@@ -6,31 +6,42 @@
<template #left_buttons>
<el-button
type="primary"
:disabled="!selectdList || selectdList.length < 1"
@click="backCase"
>撤回
</el-button>
<el-button type="primary" :disabled="!selectdList || selectdList.length < 1" @click="fullBackCase"
>撤案
>回收
</el-button>
</template>
</ProTable>
</div>
<allocationModal ref="allocationModalRef" @success="query" />
<vxe-modal
v-model="showModal"
title="提示"
height="282"
width="450"
show-footer
esc-closable
>
<div class="w-full px-3 h-full overflow-auto flex-col flex mytable">
数据中有留案案件,请选择回收方式
</div>
<template #footer>
<el-button type="default" @click="showModal = false">取消</el-button>
<el-button type="primary" @click="submitForm('withdraw')">回收</el-button>
<el-button type="danger" @click="submitForm('fullWithdraw')">强制回收</el-button>
</template>
</vxe-modal>
</div>
</template>
<script setup name="case-allocation" lang="jsx">
import allocationModal from './components/allocationModal.vue';
import { getLoantotal, getLoanpage, withdraw, fullWithdraw } from '@/api/allcation';
import { reactive, ref } from 'vue';
import { ElMessageBox, ElMessage } from 'element-plus';
import citydata from '../../../assets/citydata';
import { onMounted } from 'vue';
const allocationModalRef = ref();
const caseLRef = ref();
const selectdList = ref([]);
const curParam = ref({});
const showModal = ref(false);
const onCheckboxChange = (row) => {
selectdList.value = row.records;
};
......@@ -43,37 +54,25 @@
});
};
const backCase = async () => {
await ElMessageBox.confirm('是否确认撤回选中案件?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
});
showModal.value = true
};
const submitForm = async (type) => {
const ids = selectdList.value.map((v) => v.id).join(',');
if (type === 'withdraw') {
await withdraw(ids);
ElMessage({
type: 'success',
message: '撤回成功!',
message: '回收成功!',
plain: true,
});
query();
};
const fullBackCase = async () => {
await ElMessageBox.confirm('是否确认撤案?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
});
const ids = selectdList.value.map((v) => v.id).join(',');
} else {
await fullWithdraw(ids);
ElMessage({
type: 'success',
message: '撤案成功!',
message: '强制回收成功!',
plain: true,
});
}
query();
}
const paramCallback = (param) => {
......@@ -144,11 +143,13 @@
{
field: 'loanPlatform.name',
title: '借款机构',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, key: 'payOrg', labelWidth: 78 },
},
{
field: 'manageOrg.orgName',
showOverflow: 'tooltip',
title: '资管公司',
width: 100,
search: { el: 'input', props: { clearable: true }, key: 'manageOrg', labelWidth: 78 },
......@@ -156,12 +157,14 @@
{
field: 'batchCode',
title: '导入批次',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, key: 'batchCode', labelWidth: 78 },
},
{
field: 'distributeStatus',
title: '分派状态',
showOverflow: 'tooltip',
width: 80,
enum: distributeStatusOpt,
search: { el: 'select', props: { filterable: true }, labelWidth: 78 },
......@@ -181,23 +184,27 @@
{
field: 'tenant.name',
title: '调解中心',
showOverflow: 'tooltip',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 78 },
},
{
field: 'discount',
title: '折扣',
showOverflow: 'tooltip',
width: 80,
},
{
field: 'cpe.name',
title: 'CPE',
showOverflow: 'tooltip',
width: 60,
search: { el: 'input', props: { clearable: true }, key: 'cpeName', labelWidth: 78 },
},
{
field: 'tenantTime',
title: '分派中心日期',
showOverflow: 'tooltip',
width: 130,
search: {
el: 'date-picker',
......@@ -208,12 +215,14 @@
{
field: 'commissionAmount',
title: '债权总额',
showOverflow: 'tooltip',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 78 },
},
{
field: 'cpeDate',
title: '分派CPE日期',
showOverflow: 'tooltip',
width: 130,
search: {
el: 'date-picker',
......@@ -224,24 +233,28 @@
{
field: 'borrower.name',
title: '借款人姓名',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', key: 'borrowerName', props: { clearable: true }, labelWidth: 78 },
},
{
field: 'sumRepayAmount',
title: '已还总额',
showOverflow: 'tooltip',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 78 },
},
{
field: 'borrower.idCard',
title: '身份证',
showOverflow: 'tooltip',
width: 140,
search: { el: 'input', props: { clearable: true }, key: 'idCard', labelWidth: 78 },
},
{
field: 'borrower.phone',
key: 'borrowerPhone',
showOverflow: 'tooltip',
title: '手机',
width: 100,
search: { el: 'input', props: { clearable: true }, labelWidth: 78 },
......@@ -249,16 +262,19 @@
{
field: 'principalBalance',
title: '剩余本金',
showOverflow: 'tooltip',
width: 80,
},
{
field: 'remaininginterest',
title: '剩余利息',
showOverflow: 'tooltip',
width: 80,
},
{
field: 'commission',
title: '违约金',
showOverflow: 'tooltip',
width: 80,
},
],
......@@ -266,9 +282,6 @@
onCheckboxAll: onCheckboxAll
});
const allocation = (row) => {
allocationModalRef.value.openModal(JSON.parse(JSON.stringify(curParam.value)), JSON.parse(JSON.stringify(selectdList.value)));
};
const query = () => caseLRef.value?.search();
onMounted(() => {
......
......@@ -381,7 +381,7 @@
width: 240px;
&.label {
width: 160px;
background: #f5f7f9;
background: var(--el-color-primary-light-9);
}
}
}
......
This diff is collapsed.
......@@ -76,6 +76,7 @@
{
field: 'caseId',
title: '案件ID',
showOverflow: 'tooltip',
search: { el: 'input', labelWidth: 80 },
width: 190,
slots: {
......@@ -95,6 +96,7 @@
},
{
field: 'loanPlatform.name',
showOverflow: 'tooltip',
title: '借款机构',
width: 100,
search: { el: 'input', props: { clearable: true }, key: 'payOrg', labelWidth: 80 },
......@@ -102,12 +104,14 @@
{
field: 'manageOrg.orgName',
title: '资管公司',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, key: 'manageOrg', labelWidth: 80 },
},
{
field: 'borrower.name',
title: '借款人姓名',
showOverflow: 'tooltip',
width: 120,
search: {
el: 'input',
......@@ -119,6 +123,7 @@
{
field: 'borrower.idCard',
title: '身份证',
showOverflow: 'tooltip',
width: 140,
search: {
el: 'input',
......@@ -130,6 +135,7 @@
{
field: 'borrower.phone',
title: '手机号',
showOverflow: 'tooltip',
width: 140,
search: {
el: 'input',
......@@ -141,35 +147,41 @@
{
field: 'discount',
title: '折扣',
showOverflow: 'tooltip',
width: 80,
},
{
field: 'commissionAmount',
title: '委案金额',
showOverflow: 'tooltip',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 80 },
},
{
field: 'sumRepayAmount',
title: '累计还款金额',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, labelWidth: 80 },
},
{
field: 'sumReductionAmount',
title: '累计减免金额',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, labelWidth: 80 },
},
{
field: 'remainingAmount',
title: '剩余待还金额',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, labelWidth: 80 },
},
{
field: 'cpe.username',
showOverflow: 'tooltip',
title: 'CPE',
width: 80,
search: { el: 'input', props: { clearable: true }, key: 'cpeName', labelWidth: 80 },
......@@ -177,6 +189,7 @@
{
field: 'cpeDate',
title: '分派CPE日期',
showOverflow: 'tooltip',
width: 130,
search: {
el: 'date-picker',
......@@ -186,24 +199,28 @@
},
{
field: 'principalBalance',
showOverflow: 'tooltip',
title: '本金余额',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 80 },
},
{
field: 'debitInterest',
showOverflow: 'tooltip',
title: '欠息额',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 80 },
},
{
field: 'commission',
showOverflow: 'tooltip',
title: '手续费',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 80 },
},
{
field: 'followStatus',
showOverflow: 'tooltip',
title: '跟进结果',
width: 80,
enum: followStatusOpt,
......@@ -223,6 +240,7 @@
},
{
field: 'phoneResultStatus',
showOverflow: 'tooltip',
title: '跟进状态',
width: 80,
enum: phoneResultStatusOpt,
......@@ -243,6 +261,7 @@
{
field: 'caseStatus',
title: '案件状态',
showOverflow: 'tooltip',
width: 80,
enum: caseStatusOpt,
search: { el: 'select', props: { filterable: true }, labelWidth: 80 },
......
This diff is collapsed.
<template>
<div class="table-box">
<div>
<ProTable :config="config" ref="caseLRef" :api="getLoanpage" :paramCallback="paramCallback">
<!-- 表格 header 按钮 -->
<template #left_buttons>
<el-button
type="primary"
@click="backCase"
>撤案
</el-button>
</template>
</ProTable>
</div>
<vxe-modal
v-model="showModal"
title="提示"
height="282"
width="450"
show-footer
esc-closable
>
<div class="w-full px-3 h-full overflow-auto flex-col flex mytable">
数据中有留案案件,请选择撤案方式
</div>
<template #footer>
<el-button type="default" @click="showModal = false">取消</el-button>
<el-button type="primary" @click="submitForm('withdraw')">撤案</el-button>
<el-button type="danger" @click="submitForm('fullWithdraw')">强制撤案</el-button>
</template>
</vxe-modal>
</div>
</template>
<script setup name="case-allocation" lang="jsx">
import { getLoantotal, getLoanpage, withdraw, fullWithdraw } from '@/api/allcation';
import { reactive, ref } from 'vue';
import { ElMessageBox, ElMessage } from 'element-plus';
import citydata from '../../../assets/citydata';
import { onMounted } from 'vue';
const caseLRef = ref();
const selectdList = ref([]);
const curParam = ref({});
const showModal = ref(false);
const onCheckboxChange = (row) => {
selectdList.value = row.records;
};
const statisis = ref({});
const getStatisis = (params) => {
getLoantotal(params).then((res) => {
if (res.success) {
statisis.value = res.result;
}
});
};
const backCase = async () => {
showModal.value = true
};
const submitForm = async (type) => {
const ids = selectdList.value.map((v) => v.id).join(',');
if (type === 'withdraw') {
await withdraw(ids);
ElMessage({
type: 'success',
message: '撤案成功!',
plain: true,
});
} else {
await fullWithdraw(ids);
ElMessage({
type: 'success',
message: '强制撤案成功!',
plain: true,
});
}
query();
}
const paramCallback = (param) => {
const obj = JSON.parse(JSON.stringify(param));
if (obj.arealist && obj.arealist.length > 0) {
obj['province'] = obj.arealist[0];
obj['city'] = obj.arealist.length > 1 ? obj.arealist[1] : null;
obj['district'] = obj.arealist.length > 2 ? obj.arealist[2] : null;
delete obj['arealist'];
}
if (obj['cpeDate']) {
if (obj['cpeDate'][0]) obj['cpeDateBegin'] = obj['cpeDate'][0];
if (obj['cpeDate'][1]) obj['cpeDateEnd'] = obj['cpeDate'][1];
delete obj['cpeDate'];
}
if (obj['tenantTime']) {
if (obj['tenantTime'][0]) obj['tenantTimeBegin'] = obj['tenantTime'][0];
if (obj['tenantTime'][1]) obj['tenantTimeEnd'] = obj['tenantTime'][1];
delete obj['tenantTime'];
}
curParam.value = obj;
// getStatisis(obj);
return obj;
};
const distributeStatusOpt = [
{ label: '未分派', value: 'undistributed' },
{ label: '分派到调解中心', value: 'tenant' },
{ label: '分派到CPE', value: 'CPE' },
];
const onCheckboxAll =(flag)=> {
if (flag.checked) {
selectdList.value = flag.records;
} else {
selectdList.value = [];
}
}
console.log('citydatacitydata', citydata);
const config = reactive({
columns: [
{ type: 'checkbox', title: '', width: 40 },
{
field: 'caseId',
title: '案件ID',
showOverflow: 'tooltip',
search: { el: 'input', labelWidth: 78 },
width: 100,
},
{
field: 'arealist',
enum: citydata,
title: '所属区域',
showOverflow: 'tooltip',
width: 100,
fieldNames: { label: 'label', value: 'value' },
search: { el: 'cascader', props: { clearable: true, checkStrictly: true }, labelWidth: 78 },
slots: {
default: ({ row }) => {
return (
<div>
{row.manageOrg.province}
{row.manageOrg.city ? '-' + row.manageOrg.city : ''}
{row.manageOrg.district ? '-' + row.manageOrg.district : ''}
</div>
);
},
},
},
{
field: 'loanPlatform.name',
title: '借款机构',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, key: 'payOrg', labelWidth: 78 },
},
{
field: 'manageOrg.orgName',
showOverflow: 'tooltip',
title: '资管公司',
width: 100,
search: { el: 'input', props: { clearable: true }, key: 'manageOrg', labelWidth: 78 },
},
{
field: 'batchCode',
title: '导入批次',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, key: 'batchCode', labelWidth: 78 },
},
{
field: 'distributeStatus',
title: '分派状态',
showOverflow: 'tooltip',
width: 80,
enum: distributeStatusOpt,
search: { el: 'select', props: { filterable: true }, labelWidth: 78 },
fieldNames: { label: 'label', value: 'value' },
slots: {
default: ({ row }) => {
return (
<>
{row.distributeStatus
? distributeStatusOpt.find((v) => v.value === row.distributeStatus).label
: ''}
</>
);
},
},
},
{
field: 'tenant.name',
title: '调解中心',
showOverflow: 'tooltip',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 78 },
},
{
field: 'discount',
title: '折扣',
showOverflow: 'tooltip',
width: 80,
},
{
field: 'cpe.name',
title: 'CPE',
showOverflow: 'tooltip',
width: 60,
search: { el: 'input', props: { clearable: true }, key: 'cpeName', labelWidth: 78 },
},
{
field: 'tenantTime',
title: '分派中心日期',
showOverflow: 'tooltip',
width: 130,
search: {
el: 'date-picker',
props: { type: 'daterange', valueFormat: 'YYYY-MM-DD' },
labelWidth: 78,
},
},
{
field: 'commissionAmount',
title: '债权总额',
showOverflow: 'tooltip',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 78 },
},
{
field: 'cpeDate',
title: '分派CPE日期',
showOverflow: 'tooltip',
width: 130,
search: {
el: 'date-picker',
props: { type: 'daterange', valueFormat: 'YYYY-MM-DD' },
labelWidth: 78,
},
},
{
field: 'borrower.name',
title: '借款人姓名',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', key: 'borrowerName', props: { clearable: true }, labelWidth: 78 },
},
{
field: 'sumRepayAmount',
title: '已还总额',
showOverflow: 'tooltip',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 78 },
},
{
field: 'borrower.idCard',
title: '身份证',
showOverflow: 'tooltip',
width: 140,
search: { el: 'input', props: { clearable: true }, key: 'idCard', labelWidth: 78 },
},
{
field: 'borrower.phone',
key: 'borrowerPhone',
showOverflow: 'tooltip',
title: '手机',
width: 100,
search: { el: 'input', props: { clearable: true }, labelWidth: 78 },
},
{
field: 'principalBalance',
title: '剩余本金',
showOverflow: 'tooltip',
width: 80,
},
{
field: 'remaininginterest',
title: '剩余利息',
showOverflow: 'tooltip',
width: 80,
},
{
field: 'commission',
title: '违约金',
showOverflow: 'tooltip',
width: 80,
},
],
onCheckboxChange: onCheckboxChange,
onCheckboxAll: onCheckboxAll
});
const query = () => caseLRef.value?.search();
onMounted(() => {
query();
});
</script>
......@@ -320,6 +320,7 @@
field: 'status',
title: '超时状态',
width: 100,
showOverflow: 'tooltip',
search: { el: 'select', props: { clearable: true }, labelWidth: 78 },
slots: {
default: ({ row }) => {
......
......@@ -2,17 +2,14 @@
<div class="table-box">
<div class="table-inner">
<ProTable :config="config" ref="caseLRef" :api="getCreditPage" :paramCallback="paramCallback">
<!-- <ProTable :config="config" ref="caseLRef" :data="data"> -->
<!-- <template #table_top>
<div class="topgrp">
<div class="topbox">
<div class="topinner">
<p>统计值</p>
<p>111</p>
</div>
</div>
</div>
</template> -->
<template #left_buttons>
<el-button
type="primary"
:disabled="!selectdList || selectdList.length < 1"
@click="stayCase"
>留案
</el-button>
</template>
</ProTable>
</div>
</div>
......@@ -23,10 +20,22 @@
import { reactive, ref } from 'vue';
import { getCreditPage } from '@/api/property';
const caseLRef = ref();
import { stayLoan } from '@/api/allcation';
import { onMounted } from 'vue';
import { useUserStore } from '@/stores/modules/user';
const { userInfo } = useUserStore();
const router = useRouter();
const selectdList = ref([]);
const onCheckboxChange = (row) => {
selectdList.value = row.records;
};
const onCheckboxAll =(flag)=> {
if (flag.checked) {
selectdList.value = flag.records;
} else {
selectdList.value = [];
}
}
const onCellClick = (row) => {
router.push({
path: '/property/case-detail',
......@@ -40,6 +49,23 @@
}
return obj;
};
const stayCase = async () => {
await ElMessageBox.confirm('是否确认留案?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
});
const ids = selectdList.value.map((v) => v.id).join(',');
await stayLoan(ids);
ElMessage({
type: 'success',
message: '留案成功!',
plain: true,
});
query();
}
const followStatusOpt = [
{ label: '接通后挂断', value: 'hang_up' },
{ label: '接通有实质进展', value: 'progress' },
......@@ -78,10 +104,12 @@
];
const config = reactive({
columns: [
{ type: 'checkbox', title: '', width: 40 },
{
field: 'caseId',
title: '案件ID',
search: { el: 'input', labelWidth: 80 },
showOverflow: 'tooltip',
width: 190,
slots: {
default: ({ row, rowIndex }) => {
......@@ -101,18 +129,21 @@
{
field: 'loanPlatform.name',
title: '借款机构',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, key: 'payOrg', labelWidth: 80 },
},
{
field: 'manageOrg.orgName',
title: '资管公司',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, key: 'manageOrg', labelWidth: 80 },
},
{
field: 'borrower.name',
title: '借款人姓名',
showOverflow: 'tooltip',
width: 120,
search: {
el: 'input',
......@@ -124,6 +155,7 @@
{
field: 'borrower.idCard',
title: '身份证',
showOverflow: 'tooltip',
width: 140,
search: {
el: 'input',
......@@ -135,6 +167,7 @@
{
field: 'borrower.phone',
title: '手机号',
showOverflow: 'tooltip',
width: 140,
search: {
el: 'input',
......@@ -146,35 +179,41 @@
{
field: 'discount',
title: '折扣',
showOverflow: 'tooltip',
width: 80,
},
{
field: 'commissionAmount',
title: '委案金额',
showOverflow: 'tooltip',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 80 },
},
{
field: 'sumRepayAmount',
title: '累计还款金额',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, labelWidth: 80 },
},
{
field: 'sumReductionAmount',
title: '累计减免金额',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, labelWidth: 80 },
},
{
field: 'remainingAmount',
title: '剩余待还金额',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, labelWidth: 80 },
},
{
field: 'cpeDate',
title: '分派CPE日期',
showOverflow: 'tooltip',
width: 130,
search: {
el: 'date-picker',
......@@ -185,23 +224,27 @@
{
field: 'principalBalance',
title: '本金余额',
showOverflow: 'tooltip',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 80 },
},
{
field: 'debitInterest',
showOverflow: 'tooltip',
title: '欠息额',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 80 },
},
{
field: 'commission',
showOverflow: 'tooltip',
title: '手续费',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 80 },
},
{
field: 'followStatus',
showOverflow: 'tooltip',
title: '跟进结果',
width: 80,
enum: followStatusOpt,
......@@ -221,6 +264,7 @@
},
{
field: 'phoneResultStatus',
showOverflow: 'tooltip',
title: '跟进状态',
width: 80,
enum: phoneResultStatusOpt,
......@@ -240,6 +284,7 @@
},
{
field: 'caseStatus',
showOverflow: 'tooltip',
title: '案件状态',
width: 80,
enum: caseStatusOpt,
......
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