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