import { defHttp } from '/@/utils/http/axios'; /** * 发起审批 API(全局悬浮按钮使用) * @author GHT * @date 2026-05-29 for:【QH-MES审批流设计】发起审批运行时 */ enum Api { publishedList = '/xslmes/approvalLaunch/publishedList', bizRecords = '/xslmes/approvalLaunch/bizRecords', launch = '/xslmes/approvalLaunch/launch', launchBatch = '/xslmes/approvalLaunch/launchBatch', } /** * 已发布审批流列表(可发起的单据类型) */ export const getPublishedFlows = () => defHttp.get({ url: Api.publishedList }); /** * 根据审批流查询其绑定单据的记录列表 */ export const getBizRecords = (params: { flowId: string; keyword?: string }) => defHttp.get({ url: Api.bizRecords, params }); /** * 发起审批(单条) */ export const launchApproval = (params: { flowId: string; bizDataId: string; bizTitle?: string }) => defHttp.post({ url: Api.launch, params }); /** * 批量发起审批(列表多选) */ export const launchApprovalBatch = (params: { flowId: string; items: { bizDataId: string; bizTitle?: string }[] }) => defHttp.post({ url: Api.launchBatch, params });