Commit 284f9a1a authored by 沈翠玲's avatar 沈翠玲

稽核管理

parent 4686ace7
...@@ -11,3 +11,8 @@ export const saveAudit = (params) => { ...@@ -11,3 +11,8 @@ export const saveAudit = (params) => {
export const auditAudit = (params) => { export const auditAudit = (params) => {
return request.post('/audit/audit', params); return request.post('/audit/audit', params);
}; };
// 批量发起稽核申请
export const batchSave = (params) => {
return request.get('/TrackRecord/batchSave', params);
};
...@@ -80,3 +80,7 @@ export const byStagesflowStatusByIds = (params) => { ...@@ -80,3 +80,7 @@ export const byStagesflowStatusByIds = (params) => {
export const saveTrackRecord = (data) => { export const saveTrackRecord = (data) => {
return request.post('/TrackRecord/save', data); return request.post('/TrackRecord/save', data);
}; };
// 案件跟踪记录列表
export const getTrackRecord = (params) => {
return request.get('/TrackRecord/page', params);
};
\ No newline at end of file
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
<div class="flex justify-between"> <div class="flex justify-between">
<div> <div>
<span class="text-gray-400">姓名:</span> <span class="text-gray-400">姓名:</span>
<span>{{ currentInfo.name }}</span> <span>{{ currentInfo.guarantor.name }}</span>
</div> </div>
<div> <div>
<span class="text-gray-400">与案人关系:</span> <span class="text-gray-400">与案人关系:</span>
<span>{{ currentInfo.kinship }}</span> <span>{{ currentInfo.guarantor.kinship }}</span>
</div> </div>
<div> <div>
<span class="text-gray-400">联系号码:</span> <span class="text-gray-400">联系号码:</span>
<span>{{ currentInfo.phone }}</span> <span>{{ currentInfo.guarantor.phone }}</span>
</div> </div>
<div> <div>
<span class="text-gray-400">号码状态:</span> <span class="text-gray-400">号码状态:</span>
<span> <span>
<el-radio-group v-model="currentInfo.status" disabled> <el-radio-group v-model="currentInfo.guarantor.status" disabled>
<el-radio value="N">无效</el-radio> <el-radio value="N">无效</el-radio>
<el-radio value="Y">有效</el-radio> <el-radio value="Y">有效</el-radio>
</el-radio-group> </el-radio-group>
...@@ -154,6 +154,7 @@ ...@@ -154,6 +154,7 @@
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
:action="url" :action="url"
v-model:file-list="form.voices"
:on-success="handleFileSuccess" :on-success="handleFileSuccess"
:on-remove="handleRemove" :on-remove="handleRemove"
:auto-upload="true" :auto-upload="true"
...@@ -167,6 +168,7 @@ ...@@ -167,6 +168,7 @@
<el-upload <el-upload
:action="url" :action="url"
list-type="picture-card" list-type="picture-card"
v-model:file-list="form.images"
class="mypicture" class="mypicture"
:on-preview="handlePictureCardPreview" :on-preview="handlePictureCardPreview"
:on-success="handleFileSuccess1" :on-success="handleFileSuccess1"
...@@ -182,6 +184,7 @@ ...@@ -182,6 +184,7 @@
<el-upload <el-upload
:action="url" :action="url"
list-type="picture-card" list-type="picture-card"
v-model:file-list="form.notes"
class="mypicture" class="mypicture"
:on-preview="handlePictureCardPreview" :on-preview="handlePictureCardPreview"
:on-success="handleFileSuccess2" :on-success="handleFileSuccess2"
...@@ -197,6 +200,7 @@ ...@@ -197,6 +200,7 @@
<el-upload <el-upload
:action="url" :action="url"
list-type="picture-card" list-type="picture-card"
v-model:file-list="form.others"
class="mypicture" class="mypicture"
:on-preview="handlePictureCardPreview" :on-preview="handlePictureCardPreview"
:on-success="handleFileSuccess3" :on-success="handleFileSuccess3"
...@@ -217,8 +221,8 @@ ...@@ -217,8 +221,8 @@
<el-button @click="showModal = false">取消</el-button> <el-button @click="showModal = false">取消</el-button>
<el-button type="primary" @click="submitForm" v-if="props.mode === 'handle'">确定</el-button> <el-button type="primary" @click="submitForm" v-if="props.mode === 'handle'">确定</el-button>
<template v-else> <template v-else>
<el-button type="primary" @click="audit('pass')">通过</el-button> <el-button type="primary" @click="submitForm('pass')">通过</el-button>
<el-button type="danger" @click="audit('reject')">拒绝</el-button> <el-button type="danger" @click="submitForm('rejected')">拒绝</el-button>
</template> </template>
</div> </div>
</template> </template>
...@@ -307,22 +311,11 @@ ...@@ -307,22 +311,11 @@
trackTime: dayjs().format('YYYY-MM-DD HH:mm:ss'), trackTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
nextTime: null, nextTime: null,
}); });
const currentDetail = ref({});
const currentInfo = ref({ name: 0, kinship: 0, phone: 0, status: '' }); const currentInfo = ref({ name: 0, kinship: 0, phone: 0, status: '' });
const onHide = (done) => { const onHide = (done) => {
currentInfo.value = { name: 0, kinship: 0, phone: 0, status: '' }; currentInfo.value = { name: 0, kinship: 0, phone: 0, status: '' };
done(); done();
}; };
const audit = (type) => {
auditAudit({
trackRecord: {
id: 11
},
auditStatus: type === 'pass' ? 'complete':'rejected'
}).then(res => {
console.log('res', res)
})
}
const statusArr = [ const statusArr = [
{ {
label: '后续再跟进', label: '后续再跟进',
...@@ -452,28 +445,36 @@ ...@@ -452,28 +445,36 @@
onCheckboxChange: onCheckboxChange, onCheckboxChange: onCheckboxChange,
toolbarConfig: { enabled: false }, toolbarConfig: { enabled: false },
}); });
const openModal = (info, detail, caselist) => { const openModal = (info) => {
showModal.value = true; showModal.value = true;
currentInfo.value = info; currentInfo.value = info;
currentDetail.value = detail; form.trackTime = info.trackTime
console.log('currentInfo', currentInfo.value, currentDetail.value); form.remark = info.remark
form.phoneResultStatus = info.phoneResultStatus
tabledata.value = caselist; resuleObj.childrenlabel = info.followStatus
form.nextTime = info.nextTime
form.notes = info.notes ? info.notes.map(v => ({name: v.slice(v.lastIndexOf('/') + 1, v.length), url: envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/' + v})) : []
form.voices = info.voices ? info.voices.map(v => ({name: v.slice(v.lastIndexOf('/') + 1, v.length), url: envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/' + v})) : []
form.images = info.images ? info.images.map(v => ({name: v.slice(v.lastIndexOf('/') + 1, v.length), url: envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/' + v})) : []
form.others = info.others ? info.others.map(v => ({name: v.slice(v.lastIndexOf('/') + 1, v.length), url: envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/' + v})) : []
tabledata.value = info.loans;
console.log('formform', form)
}; };
const submitForm = () => { const submitForm = (type) => {
saveTrackRecord({ saveTrackRecord({
loans: tabledata.value, loans: tabledata.value,
guarantor: currentInfo.value, id: currentInfo.value.id,
guarantor: currentInfo.value.guarantor,
trackTime: form.trackTime, trackTime: form.trackTime,
nextTime: form.nextTime, nextTime: form.nextTime,
phoneResultStatus: form.phoneResultStatus, phoneResultStatus: form.phoneResultStatus,
auditStatus: 'un_audit', auditStatus: type === 'rejected' ? 'rejected' : type === 'pass' ? 'pass' : 'complete',
followStatus: resuleObj.childrenlabel, followStatus: resuleObj.childrenlabel,
remark: form.remark, remark: form.remark,
voices: form.voices.map((v) => v.url), voices: form.voices.map((v) => v.url).length > 0 ? form.voices.map((v) => v.url) : null,
images: form.images.map((v) => v.url), images: form.images.map((v) => v.url).length > 0 ? form.images.map((v) => v.url) : null,
notes: form.notes.map((v) => v.url), notes: form.notes.map((v) => v.url).length > 0 ? form.notes.map((v) => v.url) : null,
others: form.others.map((v) => v.url), others: form.others.map((v) => v.url).length > 0 ? form.others.map((v) => v.url) : null,
}).then((res) => { }).then((res) => {
if (res.success) { if (res.success) {
ElMessage.success({ ElMessage.success({
......
<template> <template>
<div class="table-box"> <div class="table-box">
<div> <div>
<ProTable :config="config" ref="caseLRef" :api="getAuditPage" :paramCallback="paramCallback"> <ProTable :config="config" ref="caseLRef" :api="getTrackRecord" :paramCallback="paramCallback">
<template #table_top> <template #table_top>
<div> <div>
<el-tabs <el-tabs
...@@ -15,14 +15,14 @@ ...@@ -15,14 +15,14 @@
</div> </div>
</template> </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()" :mode="callMode"></callDrawer> <callDrawer ref="callDrawerRef" @success="query()" :mode="callMode"></callDrawer>
...@@ -35,10 +35,15 @@ ...@@ -35,10 +35,15 @@
import { inject } from 'vue'; import { inject } from 'vue';
import { computed } from 'vue'; import { computed } from 'vue';
import callDrawer from './components/callDrawer.vue'; import callDrawer from './components/callDrawer.vue';
import { ElButton } from 'element-plus'; import { ElMessageBox, ElMessage,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'; import {
getTrackRecord
} from '@/api/property';
import {
batchSave
} 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');
...@@ -105,6 +110,10 @@ ...@@ -105,6 +110,10 @@
if (obj['nextTime'][1]) obj['nextTrackTimeEnd'] = obj['nextTime'][1]; if (obj['nextTime'][1]) obj['nextTrackTimeEnd'] = obj['nextTime'][1];
delete obj['nextTime']; delete obj['nextTime'];
} }
// obj['voices'] = 'Y'
// obj['images'] = 'Y'
// obj['notes'] = 'Y'
// obj['others'] = 'Y'
return obj; return obj;
}; };
const callTelephone = (row, type) => { const callTelephone = (row, type) => {
...@@ -120,7 +129,7 @@ ...@@ -120,7 +129,7 @@
return { return {
columns: [ columns: [
{ type: 'checkbox', title: '', width: 40 }, { type: 'checkbox', title: '', width: 40 },
{ field: 'trackRecord.id', title: '跟进记录ID', width: 90 }, { field: 'id', title: '跟进记录ID', width: 90 },
{ {
field: 'caseId', field: 'caseId',
title: '案件ID', title: '案件ID',
...@@ -130,14 +139,14 @@ ...@@ -130,14 +139,14 @@
default: ({ row }) => { default: ({ row }) => {
return ( return (
<> <>
{row.trackRecord.loans.map(v => v.caseId).join(',')} {row.loans.map(v => v.caseId).join(',')}
</> </>
); );
}, },
}, },
}, },
{ {
field: 'trackRecord.trackTime', field: 'trackTime',
title: '跟进日期', title: '跟进日期',
width: 100, width: 100,
search: { search: {
...@@ -146,7 +155,7 @@ ...@@ -146,7 +155,7 @@
}, },
}, },
{ {
field: 'trackRecord.nextTime', field: 'nextTime',
title: '下次跟进时间', title: '下次跟进时间',
width: 110, width: 110,
search: { search: {
...@@ -155,30 +164,30 @@ ...@@ -155,30 +164,30 @@
}, },
}, },
{ {
field: 'trackRecord.guarantor.name', field: 'guarantor.name',
title: '联系人姓名', title: '联系人姓名',
width: 110, width: 110,
search: { el: 'input', props: { clearable: true }, key: 'guarantorName' }, search: { el: 'input', props: { clearable: true }, key: 'guarantorName' },
}, },
{ {
field: 'trackRecord.guarantor.phone', field: 'guarantor.phone',
title: '联系人号码', title: '联系人号码',
width: 110, width: 110,
search: { el: 'input', props: { clearable: true }, key: 'guarantorPhone' }, search: { el: 'input', props: { clearable: true }, key: 'guarantorPhone' },
}, },
{ {
field: 'trackRecord.followStatus', field: 'followStatus',
title: '拨打跟进结果', title: '拨打跟进结果',
width: 120, width: 120,
enum: followStatusOpt, enum: followStatusOpt,
search: { el: 'select', props: { filterable: true }, span: 1 }, search: { el: 'select', props: { filterable: true, multiple: true}, span: 1, defaultValue: ['progress', 'pass_on', 'no_pass', 'Claims_unrelated_to_creditors', 'Claiming_not_to_be_myself'] },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return ( return (
<> <>
{row.trackRecord.followStatus {row.followStatus
? followStatusOpt.find((v) => v.value === row.trackRecord.followStatus).label ? followStatusOpt.find((v) => v.value === row.followStatus).label
: ''} : ''}
</> </>
); );
...@@ -186,7 +195,7 @@ ...@@ -186,7 +195,7 @@
}, },
}, },
{ {
field: 'trackRecord.phoneResultStatus', field: 'phoneResultStatus',
title: '拨打处置状态', title: '拨打处置状态',
width: 120, width: 120,
enum: phoneResultStatusOpt, enum: phoneResultStatusOpt,
...@@ -196,8 +205,8 @@ ...@@ -196,8 +205,8 @@
default: ({ row }) => { default: ({ row }) => {
return ( return (
<> <>
{row.trackRecord.phoneResultStatus {row.phoneResultStatus
? phoneResultStatusOpt.find((v) => v.value === row.trackRecord.phoneResultStatus).label ? phoneResultStatusOpt.find((v) => v.value === row.phoneResultStatus).label
: ''} : ''}
</> </>
); );
...@@ -212,8 +221,8 @@ ...@@ -212,8 +221,8 @@
default: ({ row }) => { default: ({ row }) => {
return ( return (
<> <>
{row.trackRecord.auditStatus {row.auditStatus
? auditStatusOpt.find((v) => v.value === row.trackRecord.auditStatus).label ? auditStatusOpt.find((v) => v.value === row.auditStatus).label
: ''} : ''}
</> </>
); );
...@@ -232,12 +241,12 @@ ...@@ -232,12 +241,12 @@
width: 80, width: 80,
slots: { slots: {
default: ({ row, rowIndex }) => { default: ({ row, rowIndex }) => {
if (row.trackRecord.voices && row.trackRecord.voices.length > 0) { if (row.voices && row.voices.length > 0) {
return ( return (
<> <>
{row.trackRecord.voices.map((item, index) => ( {row.voices.map((item, index) => (
<el-icon> <el-icon>
<Download onClick={() => download(row.trackRecord)} /> <Download onClick={() => download(row)} />
</el-icon> </el-icon>
))} ))}
</> </>
...@@ -252,11 +261,11 @@ ...@@ -252,11 +261,11 @@
width: 80, width: 80,
slots: { slots: {
default: ({ row, rowIndex }) => { default: ({ row, rowIndex }) => {
if (row.trackRecord.images && row.trackRecord.images.length > 0) { if (row.images && row.images.length > 0) {
return ( return (
<> <>
<el-icon> <el-icon>
<Picture onClick={() => preview(row.trackRecord, 'images')} /> <Picture onClick={() => preview(row, 'images')} />
</el-icon> </el-icon>
</> </>
); );
...@@ -270,11 +279,11 @@ ...@@ -270,11 +279,11 @@
width: 80, width: 80,
slots: { slots: {
default: ({ row, rowIndex }) => { default: ({ row, rowIndex }) => {
if (row.trackRecord.notes && row.trackRecord.notes.length > 0) { if (row.notes && row.notes.length > 0) {
return ( return (
<> <>
<el-icon> <el-icon>
<Picture onClick={() => preview(row.trackRecord, 'notes')} /> <Picture onClick={() => preview(row, 'notes')} />
</el-icon> </el-icon>
</> </>
); );
...@@ -292,7 +301,7 @@ ...@@ -292,7 +301,7 @@
return ( return (
<> <>
<el-icon> <el-icon>
<Picture onClick={() => preview(row.trackRecord, 'others')} /> <Picture onClick={() => preview(row, 'others')} />
</el-icon> </el-icon>
</> </>
); );
...@@ -307,24 +316,22 @@ ...@@ -307,24 +316,22 @@
visible: (activeName.value === 'audit' || activeName.value === 'complete') ? true : false, 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 (activeName.value === 'audit') {
if (activeName.value === 'audit') { return (
return ( <>
<> <ElButton type="primary" onClick={() => callTelephone(row, 'handle')}>
<ElButton type="primary" onClick={() => callTelephone(row, 'handle')}> 处理
处理 </ElButton>
</ElButton> </>
</> )
) } else {
} else { return (
return ( <>
<> <ElButton type="primary" onClick={() => callTelephone(row, 'audit')}>
<ElButton type="primary" onClick={() => callTelephone(row, 'audit')}> 审核
审核 </ElButton>
</ElButton> </>
</> )
)
}
} }
} }
} }
...@@ -345,14 +352,23 @@ ...@@ -345,14 +352,23 @@
const name = item.slice(item.lastIndexOf('/') + 1, item.length); const name = item.slice(item.lastIndexOf('/') + 1, item.length);
downloadfile(envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/' + item, {}, name); downloadfile(envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/' + item, {}, name);
}; };
const audit = (row) => { const audit = async (row) => {
if ( const list = caseLRef.value.element.getCheckboxRecords();
!caseLRef.value.element.getCheckboxRecords() || if (!list.length) return
caseLRef.value.element.getCheckboxRecords().length === 0 await ElMessageBox.confirm('是否确认发起稽核勾选项?', '提示', {
) confirmButtonText: '确认',
return; cancelButtonText: '取消',
console.log('111', caseLRef.value.element.getCheckboxRecords()); type: 'warning',
allocationModalRef.value.openModal(JSON.parse(JSON.stringify(row))); });
const ids = list.map((v) => v.id).join(',');
await batchSave({ids: ids});
ElMessage({
type: 'success',
message: '稽核成功!',
plain: true,
});
query();
}; };
const query = () => caseLRef.value?.search(); const query = () => caseLRef.value?.search();
......
...@@ -284,7 +284,6 @@ ...@@ -284,7 +284,6 @@
}); });
const form = reactive({ const form = reactive({
sum: 0,
images: [], images: [],
notes: [], notes: [],
phoneResultStatus: '', phoneResultStatus: '',
...@@ -434,10 +433,26 @@ ...@@ -434,10 +433,26 @@
currentInfo.value = info; currentInfo.value = info;
currentDetail.value = detail; currentDetail.value = detail;
console.log('currentInfo', currentInfo.value, currentDetail.value); console.log('currentInfo', currentInfo.value, currentDetail.value);
form.sum = 0
form.phoneResultStatus = ''
form.remark = ''
form.nextTime = null
form.trackTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
form.images = []
form.notes = []
form.others = []
form.voices = []
resuleObj.label = '本人可联'
resuleObj.childrenlabel = null
tabledata.value = caselist; tabledata.value = caselist;
}; };
const submitForm = () => { const submitForm = () => {
if (!form.phoneResultStatus) return ElMessage.warning({
message: '跟进状态必选'
});
if (!resuleObj.childrenlabel) return ElMessage.warning({
message: '跟进结果必选'
});
saveTrackRecord({ saveTrackRecord({
loans: tabledata.value, loans: tabledata.value,
guarantor: currentInfo.value, guarantor: currentInfo.value,
...@@ -447,10 +462,10 @@ ...@@ -447,10 +462,10 @@
followStatus: resuleObj.childrenlabel, followStatus: resuleObj.childrenlabel,
remark: form.remark, remark: form.remark,
auditStatus: 'un_audit', auditStatus: 'un_audit',
voices: form.voices.map((v) => v.url), voices: form.voices.map((v) => v.url).length > 0 ? form.voices.map((v) => v.url) : null,
images: form.images.map((v) => v.url), images: form.images.map((v) => v.url).length > 0 ? form.images.map((v) => v.url) : null,
notes: form.notes.map((v) => v.url), notes: form.notes.map((v) => v.url).length > 0 ? form.notes.map((v) => v.url) : null,
others: form.others.map((v) => v.url), others: form.others.map((v) => v.url).length > 0 ? form.others.map((v) => v.url) : null,
}).then((res) => { }).then((res) => {
if (res.success) { if (res.success) {
ElMessage.success({ ElMessage.success({
......
...@@ -481,25 +481,6 @@ ...@@ -481,25 +481,6 @@
} }
}, },
}, },
},
{
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 },
......
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