liu
3 天以前 31f8c28b502a3f963a2651194112584371448e37
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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 },
  });
}