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
77 lines
1.7 KiB
TypeScript
|
3 weeks ago
|
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
|
||
|
|
});
|
||
|
|
};
|