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.
89 lines
1.8 KiB
TypeScript
89 lines
1.8 KiB
TypeScript
import request from '@/utils/request';
|
|
import { AxiosPromise } from 'axios';
|
|
import { TimesheetInfoVO, TimesheetInfoForm, TimesheetInfoQuery } from '@/api/oa/erp/timesheetInfo/types';
|
|
|
|
/**
|
|
* 查询工时填报列表
|
|
* @param query
|
|
* @returns {*}
|
|
*/
|
|
|
|
export const listTimesheetInfo = (query?: TimesheetInfoQuery): AxiosPromise<TimesheetInfoVO[]> => {
|
|
return request({
|
|
url: '/oa/erp/timesheetInfo/list',
|
|
method: 'get',
|
|
params: query
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 查询工时填报详细
|
|
* @param timesheetId
|
|
*/
|
|
export const getTimesheetInfo = (timesheetId: string | number): AxiosPromise<TimesheetInfoVO> => {
|
|
return request({
|
|
url: '/oa/erp/timesheetInfo/' + timesheetId,
|
|
method: 'get'
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 新增工时填报
|
|
* @param data
|
|
*/
|
|
export const addTimesheetInfo = (data: TimesheetInfoForm) => {
|
|
return request({
|
|
url: '/oa/erp/timesheetInfo',
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 修改工时填报
|
|
* @param data
|
|
*/
|
|
export const updateTimesheetInfo = (data: TimesheetInfoForm) => {
|
|
return request({
|
|
url: '/oa/erp/timesheetInfo',
|
|
method: 'put',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 删除工时填报
|
|
* @param timesheetId
|
|
*/
|
|
export const delTimesheetInfo = (timesheetId: string | number | Array<string | number>) => {
|
|
return request({
|
|
url: '/oa/erp/timesheetInfo/' + timesheetId,
|
|
method: 'delete'
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 下拉框查询工时填报列表
|
|
* @param query
|
|
* @returns {*}
|
|
*/
|
|
export function getErpTimesheetInfoList(query) {
|
|
return request({
|
|
url: '/oa/erp/timesheetInfo/getErpTimesheetInfoList',
|
|
method: 'get',
|
|
params: query
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 工时填报提交并发起流程
|
|
* @param data 表单数据
|
|
*/
|
|
export const submitTimesheetAndFlowStart = (data: any) => {
|
|
return request({
|
|
url: '/oa/erp/timesheetInfo/submitAndFlowStart',
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
};
|