b8d74de4a4
审核对象是「一条认证记录」,每次提交产生一条,原列表只能看审核中的, 已通过与已驳回的记录无从查看。 三个页签默认停在待审核;切换页签回到第一页;只有审核中的记录显示「审核」, 终态记录显示「查看」(详情弹窗本就对终态禁用通过/驳回)。
50 lines
1.3 KiB
JavaScript
50 lines
1.3 KiB
JavaScript
import request from '@/axios';
|
|
|
|
/**
|
|
* 认证记录列表:按审核状态分页,按提交时间倒序
|
|
* 审核对象是**一条认证记录**,不是一辆车或一名司机,故必须带 bizType 区分
|
|
* status 为审核状态(0审核中 1已通过 2已驳回 3已作废);不传时后端按 0 处理
|
|
*/
|
|
export const getPendingPage = (bizType, current, size, params) => {
|
|
return request({
|
|
url: '/blade-transport/certification-audit/pending-page',
|
|
method: 'get',
|
|
params: {
|
|
...params,
|
|
bizType,
|
|
current,
|
|
size,
|
|
},
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 审核详情:同时返回本次待审快照与该对象当前生效快照,供前端做字段级对比
|
|
* 从未认证通过时 effectiveSnapshotJson 为空串
|
|
*/
|
|
export const getAuditDetail = id => {
|
|
return request({
|
|
url: '/blade-transport/certification-audit/detail',
|
|
method: 'get',
|
|
params: {
|
|
id,
|
|
},
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 审核一条认证记录
|
|
* 通过时不传驳回原因;驳回时必须传,且原因不超过 200 字
|
|
*/
|
|
export const auditCertification = (id, pass, rejectReason) => {
|
|
return request({
|
|
url: '/blade-transport/certification-audit/audit',
|
|
method: 'post',
|
|
params: {
|
|
id,
|
|
pass,
|
|
...(rejectReason ? { rejectReason } : {}),
|
|
},
|
|
});
|
|
};
|