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}`);
|
}
|