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

稽核管理

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