import type { PageParam, PageResult } from '@vben/request';
|
|
import { requestClient } from '#/api/request';
|
|
export namespace SrmSupplierApplyApi {
|
export interface ApplyVO {
|
id?: number;
|
applyNo?: string;
|
supplierId?: number;
|
supplierName: string;
|
supplierType?: string;
|
companyNature?: string;
|
registeredCapital?: number;
|
businessLicenseNo?: string;
|
taxNo?: string;
|
address?: string;
|
bankName?: string;
|
bankAccount?: string;
|
contactName?: string;
|
contactMobile?: string;
|
contactEmail?: string;
|
applyUserName?: string;
|
applyTime?: string;
|
applyStatus?: number;
|
applyStatusLabel?: string;
|
auditComment?: string;
|
processInstanceId?: string;
|
remark?: string;
|
createTime?: string;
|
}
|
|
/** 协同办公审批流程定义 */
|
export interface ProcessDefinition {
|
id: string;
|
key: string;
|
name: string;
|
}
|
}
|
|
/** 分页查询准入申请 */
|
export function getApplyPage(params: PageParam) {
|
return requestClient.get<PageResult<SrmSupplierApplyApi.ApplyVO>>('/srm/supplier-apply/page', { params });
|
}
|
|
/** 获取准入申请详情 */
|
export function getApply(id: number) {
|
return requestClient.get<SrmSupplierApplyApi.ApplyVO>(`/srm/supplier-apply/get?id=${id}`);
|
}
|
|
/** 创建准入申请 */
|
export function createApply(data: SrmSupplierApplyApi.ApplyVO) {
|
return requestClient.post('/srm/supplier-apply/create', data);
|
}
|
|
/** 更新准入申请 */
|
export function updateApply(data: SrmSupplierApplyApi.ApplyVO) {
|
return requestClient.put('/srm/supplier-apply/update', data);
|
}
|
|
/** 删除准入申请 */
|
export function deleteApply(id: number) {
|
return requestClient.delete(`/srm/supplier-apply/delete?id=${id}`);
|
}
|
|
/** 获取审批流程列表(协同办公已发布流程) */
|
export function getApproveProcessList() {
|
return requestClient.get<SrmSupplierApplyApi.ProcessDefinition[]>(
|
'/srm/supplier-apply/approve-process-list',
|
);
|
}
|
|
/** 提交准入申请审批(启动协同办公流程) */
|
export function submitApply(id: number, processDefinitionKey: string) {
|
return requestClient.put('/srm/supplier-apply/submit', null, {
|
params: { id, processDefinitionKey },
|
});
|
}
|