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.

77 lines
1.7 KiB
TypeScript

import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { TimesheetPreAllocVO, TimesheetPreAllocForm, TimesheetPreAllocQuery } from '@/api/oa/erp/timesheetPreAlloc/types';
/**
*
* @param query
* @returns {*}
*/
export const listTimesheetPreAlloc = (query?: TimesheetPreAllocQuery): AxiosPromise<TimesheetPreAllocVO[]> => {
return request({
url: '/oa/erp/timesheetPreAlloc/list',
method: 'get',
params: query
});
};
/**
*
* @param allocId
*/
export const getTimesheetPreAlloc = (allocId: string | number): AxiosPromise<TimesheetPreAllocVO> => {
return request({
url: '/oa/erp/timesheetPreAlloc/' + allocId,
method: 'get'
});
};
/**
*
* @param data
*/
export const addTimesheetPreAlloc = (data: TimesheetPreAllocForm) => {
return request({
url: '/oa/erp/timesheetPreAlloc',
method: 'post',
data: data
});
};
/**
*
* @param data
*/
export const updateTimesheetPreAlloc = (data: TimesheetPreAllocForm) => {
return request({
url: '/oa/erp/timesheetPreAlloc',
method: 'put',
data: data
});
};
/**
*
* @param allocId
*/
export const delTimesheetPreAlloc = (allocId: string | number | Array<string | number>) => {
return request({
url: '/oa/erp/timesheetPreAlloc/' + allocId,
method: 'delete'
});
};
/**
*
* @param query
* @returns {*}
*/
export function getErpTimesheetPreAllocList (query) {
return request({
url: '/oa/erp/timesheetPreAlloc/getErpTimesheetPreAllocList',
method: 'get',
params: query
});
};