Files
qhmes/jeecgboot-vue3/src/views/approval/gate/approvalGate.api.ts

32 lines
1.0 KiB
Vue

import { defHttp } from '/@/utils/http/axios';
enum Api {
canLaunch = '/xslmes/approvalGate/canLaunch',
canLaunchBatch = '/xslmes/approvalGate/canLaunchBatch',
history = '/xslmes/approvalGate/history',
}
export interface ApprovalGateVo {
allowed?: boolean;
reason?: string;
bizTable?: string;
bizDataId?: string;
latestRecordId?: string;
latestStatus?: string;
latestChannel?: string;
latestChannelText?: string;
latestStatusText?: string;
}
/** 检查是否允许发起审批 */
export const checkCanLaunch = (params: { bizTable: string; bizDataId: string }) =>
defHttp.get<ApprovalGateVo>({ url: Api.canLaunch, params });
/** 批量检查是否允许发起审批 */
export const checkCanLaunchBatch = (params: { bizTable: string; bizDataIds: string[] }) =>
defHttp.post<ApprovalGateVo[]>({ url: Api.canLaunchBatch, params });
/** 查询业务单据审批台账历史 */
export const getApprovalHistory = (params: { bizTable: string; bizDataId: string }) =>
defHttp.get({ url: Api.history, params });