Commit 009c4713 authored by 沈翠玲's avatar 沈翠玲

稽核管理

parent fe3afc22
import request from '@/utils/http/index';
// 稽核列表
export const getAuditPage = (params) => {
return request.get('/audit/page', params);
};
// 发起稽核
export const saveAudit = (params) => {
return request.post('/audit/save', params);
};
// 稽核审核
export const auditAudit = (params) => {
return request.post('/audit/audit', params);
};
......@@ -27,6 +27,11 @@ export const getByStages = (id) => {
return request.get('/Loan/getByStages?borrowerId=' + id);
};
// 根据借款人查询所有的联系人
export const getGuarantors = (id) => {
return request.get('/Loan/getGuarantors?borrowerId=' + id);
};
// 根据借款人查询所有的还款记录
export const getRepayRecords = (id) => {
return request.get('/Loan/getRepayRecords?borrowerId=' + id);
......
This diff is collapsed.
<template>
<div class="table-box">
<div>
<ProTable :config="config" :data="data" ref="caseLRef">
<ProTable :config="config" ref="caseLRef" :api="getAuditPage" :paramCallback="paramCallback">
<template #table_top>
<div>
<el-tabs
v-model="activeName"
type="card"
class="demo-tabs"
@tab-click="handleClick"
>
<el-tab-pane :label="item.label" :name="item.value" v-for="(item, index) in auditStatusOpt" :key="index"></el-tab-pane>
</el-tabs>
</div>
</template>
<!-- 表格 header 按钮 -->
<template #left_buttons>
<!-- <template #left_buttons>
<el-button
type="primary"
@click="audit"
:disabled="!selectdList || selectdList.length === 0"
>发起稽核</el-button
>
</template>
</template> -->
</ProTable>
</div>
<callDrawer ref="callDrawerRef" @success="query()"></callDrawer>
<callDrawer ref="callDrawerRef" @success="query()" :mode="callMode"></callDrawer>
<el-image-viewer :url-list="srcList" v-if="RefImage" @close="RefImage = false" />
</div>
</template>
......@@ -21,10 +33,12 @@
<script setup name="case-audit" lang="jsx">
import { Picture, Download } from '@element-plus/icons-vue';
import { inject } from 'vue';
import { computed } from 'vue';
import callDrawer from './components/callDrawer.vue';
import { ElButton } from 'element-plus';
import { onMounted } from 'vue';
import { getAppEnvConfig } from '@/utils/env';
import { getAuditPage } from '@/api/audit';
const envs = getAppEnvConfig();
import { reactive, ref } from 'vue';
const downloadfile = inject('download');
......@@ -70,10 +84,30 @@
{ label: '已还款', value: 'Repaired' },
{ label: '代履行还款', value: 'repayment_others' },
];
const callTelephone = (row) => {
const auditStatusOpt = [
{ label: '未稽核', value: 'un_audit' },
{ label: '稽核中', value: 'audit' },
{ label: '已拒绝', value: 'rejected' },
{ label: '已完成', value: 'complete' }
];
const activeName = ref('un_audit')
const callMode = ref('')
const paramCallback = (param) => {
const obj = JSON.parse(JSON.stringify(param));
obj['auditStatus'] = activeName.value
return obj;
};
const callTelephone = (row, type) => {
callMode.value = type
callDrawerRef.value.openModal(JSON.parse(JSON.stringify(row)));
};
const config = reactive({
const handleClick = () =>{
setTimeout(() => {
query()
}, 300);
}
const config = computed(() => {
return {
columns: [
{ type: 'checkbox', title: '', width: 40 },
{ field: 'id', title: '跟进记录ID', width: 90 },
......@@ -82,6 +116,15 @@
title: '案件ID',
width: 80,
search: { el: 'input', props: { clearable: true } },
slots: {
default: ({ row }) => {
return (
<>
{row.trackRecord.loans.map(v => v.caseId).join(',')}
</>
);
},
},
},
{
field: 'trackTime',
......@@ -152,18 +195,15 @@
},
},
{
field: 'phoneResultStatus',
field: 'auditStatus',
title: '稽核状态',
width: 80,
enum: phoneResultStatusOpt,
search: { el: 'select', props: { filterable: true }, span: 1 },
fieldNames: { label: 'label', value: 'value' },
slots: {
default: ({ row }) => {
return (
<>
{row.phoneResultStatus
? phoneResultStatusOpt.find((v) => v.value === row.phoneResultStatus).label
{row.auditStatus
? auditStatusOpt.find((v) => v.value === row.auditStatus).label
: ''}
</>
);
......@@ -254,22 +294,34 @@
field: 'code',
title: '操作',
width: 80,
visible: (activeName.value === 'audit' || activeName.value === 'complete') ? true : false,
slots: {
default: ({ row, rowIndex }) => {
if (row.others && row.others.length > 0) {
if (activeName.value === 'audit') {
return (
<>
<ElButton type="primary" onClick={() => callTelephone(row)}>
<ElButton type="primary" onClick={() => callTelephone(row, 'handle')}>
处理
</ElButton>
</>
);
)
} else {
return (
<>
<ElButton type="primary" onClick={() => callTelephone(row, 'audit')}>
审核
</ElButton>
</>
)
}
}
}
}
},
},
},
],
onCheckboxChange: onCheckboxChange,
onCheckboxChange: onCheckboxChange
}
});
const preview = (item, type) => {
const list = [];
......@@ -297,16 +349,4 @@
onMounted(() => {
query();
});
const data = [
{ name: 'admin', code: 'admin', role: 'superadmin' },
{ name: 'account1', code: 'account1', role: 'user' },
{ name: 'account2', code: 'account2', role: 'user' },
{ name: 'account3', code: 'account3', role: 'user' },
{ name: 'account3', code: 'account3', role: 'user' },
{ name: 'account3', code: 'account3', role: 'user' },
{ name: 'account3', code: 'account3', role: 'user' },
{ name: 'account3', code: 'account3', role: 'user' },
{ name: 'account3', code: 'account3', role: 'user' },
{ name: 'account3', code: 'account3', role: 'user' },
];
</script>
......@@ -17,7 +17,7 @@
<el-button type="primary" @click="reduce">减免申请</el-button>
<el-button type="primary" @click="split">分期申请</el-button>
</div>
<div class="detail-steps">
<div class="detail-steps" style="display:none;">
<el-steps :active="activeStep">
<el-step
:title="item.title"
......@@ -59,7 +59,7 @@
<div class="box-content">
<ProTable
:config="relationConfig"
:data="detail?.borrower?.guarantors"
:data="guarantorData"
:showPagination="false"
:showToolBar="false"
/>
......@@ -230,12 +230,15 @@
getByStages,
listByBorrower,
getRepayRecords,
getGuarantors
} from '@/api/property';
import { Picture, Download } from '@element-plus/icons-vue';
import { saveAudit } from '@/api/audit';
import { inject } from 'vue';
const envs = getAppEnvConfig();
const returnData = ref([]);
const recordData = ref([]);
const guarantorData = ref([]);
const reduceData = ref([]);
const splitData = ref([]);
const srcList = ref([]);
......@@ -479,6 +482,25 @@
},
},
},
{
field: 'code',
title: '',
slots: {
default: ({ row, rowIndex }) => {
return (
<>
<ElButton
type="primary"
onClick={() => audit(row)}
>
{/* <ElButton type="primary" onClick={() => callTelephone(row)}> */}
发起稽核
</ElButton>
</>
);
},
},
}
],
toolbarConfig: { enabled: false },
});
......@@ -740,6 +762,13 @@
}
});
};
const getGuarantorsList = (borrowerId) => {
getGuarantors(borrowerId).then((res) => {
if (res.result && res.result) {
guarantorData.value = res.result;
}
});
};
const onCellCase = ({ row, rowIndex }) => {
console.log('row.borrower.id', row);
......@@ -755,6 +784,15 @@
caseDetailRef.value?.setAllRowExpand(true);
}
};
const audit = (row) => {
saveAudit({
trackRecord: {
id: row.id
}
}).then(res => {
})
}
const reduceConfig = reactive({
columns: [
{
......@@ -868,8 +906,10 @@
onBeforeMount(async () => {
const id = JSON.parse(route.query.id);
const { result } = await getCredit(id);
console.log('result', result)
detail.value = result;
if (detail.value?.borrower?.id) {
getGuarantorsList(detail.value?.borrower?.id)
getTrackRecordList(detail.value?.borrower?.id);
listByBorrower(detail.value?.borrower?.id).then((res) => {
if (res.result && res.result) {
......
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