You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
2.6 KiB
TypeScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { ErpProjectChangeVO, ErpProjectChangeForm, ErpProjectChangeQuery } from '@/api/oa/erp/erpProjectChange/types';
/**
* 查询项目变更申请列表
* @param query
* @returns {*}
*/
export const listErpProjectChange = (query?: ErpProjectChangeQuery): AxiosPromise<ErpProjectChangeVO[]> => {
return request({
url: '/oa/erp/erpProjectChange/list',
method: 'get',
params: query
});
};
/**
* 查询项目变更申请详细
* @param projectChangeId
*/
export const getErpProjectChange = (projectChangeId: string | number): AxiosPromise<ErpProjectChangeVO> => {
return request({
url: '/oa/erp/erpProjectChange/' + projectChangeId,
method: 'get'
});
};
/**
* 新增项目变更申请
* @param data
*/
export const addErpProjectChange = (data: ErpProjectChangeForm) => {
return request({
url: '/oa/erp/erpProjectChange',
method: 'post',
data: data
});
};
/**
* 修改项目变更申请
* @param data
*/
export const updateErpProjectChange = (data: ErpProjectChangeForm) => {
return request({
url: '/oa/erp/erpProjectChange',
method: 'put',
data: data
});
};
/**
* 删除项目变更申请
* @param projectChangeId
*/
export const delErpProjectChange = (projectChangeId: string | number | Array<string | number>) => {
return request({
url: '/oa/erp/erpProjectChange/' + projectChangeId,
method: 'delete'
});
};
/**
* 下拉框查询项目变更申请列表
* @param query
* @returns {*}
*/
export function getErpProjectChangeList (query) {
return request({
url: '/oa/erp/erpProjectChange/getErpProjectChangeList',
method: 'get',
params: query
});
};
/**
* 根据项目ID准备项目变更信息带出项目信息和项目计划阶段
* @param projectId
*/
export const prepareProjectChangeWithInfo = (projectId: string | number): AxiosPromise<ErpProjectChangeVO> => {
return request({
url: '/oa/erp/erpProjectChange/prepareWithInfo/' + projectId,
method: 'get'
});
};
/**
* 提交项目变更并发起审批流
* @param data
*/
export const submitProjectChangeAndFlowStart = (data: ErpProjectChangeForm) => {
return request({
url: '/oa/erp/erpProjectChange/submitAndFlowStart',
method: 'post',
data: data
});
};
/**
* 查询指定项目计划的所有变更记录
* @param projectPlanId
*/
export const queryProjectChangeByProjectPlanId = (projectPlanId: string | number): AxiosPromise<ErpProjectChangeVO[]> => {
return request({
url: '/oa/erp/erpProjectChange/queryByProjectPlanId/' + projectPlanId,
method: 'get'
});
};