xiaoyi
3 天以前 5c243d9d05da668a32b1bc9a4f543ea081488d11
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
import type { PageParam, PageResult } from '@vben/request';
 
import { requestClient } from '#/api/request';
 
export namespace CrmContractCommandApi {
  export interface ContractCommand {
    id?: number;
    contractId?: number;
    contractNo?: string;
    commandType?: string;
    targetModule?: string;
    targetId?: number;
    bizNo?: string;
    operatorId?: number;
    operatorName?: string;
    operateTime?: string;
    status?: number;
    remark?: string;
    createTime?: string;
  }
  export interface PageParams extends PageParam {
    contractId?: number;
    commandType?: string;
    status?: number;
    bizNo?: string;
  }
}
 
/** 查询合同指令分页 */
export function getContractCommandPage(
  params: CrmContractCommandApi.PageParams,
) {
  return requestClient.get<PageResult<CrmContractCommandApi.ContractCommand>>(
    '/crm/contract-command/page',
    { params },
  );
}
 
/** 新增合同指令 */
export function createContractCommand(
  data: CrmContractCommandApi.ContractCommand,
) {
  return requestClient.post('/crm/contract-command/create', data);
}
 
/** 更新合同指令 */
export function updateContractCommand(
  data: CrmContractCommandApi.ContractCommand,
) {
  return requestClient.put('/crm/contract-command/update', data);
}
 
/** 执行合同指令 */
export function executeContractCommand(id: number) {
  return requestClient.put(`/crm/contract-command/execute?id=${id}`);
}
 
/** 取消合同指令 */
export function cancelContractCommand(id: number) {
  return requestClient.put(`/crm/contract-command/cancel?id=${id}`);
}
 
/** 删除合同指令 */
export function deleteContractCommand(id: number) {
  return requestClient.delete(`/crm/contract-command/delete?id=${id}`);
}