diff --git a/src/api/workflow/express/index.ts b/src/api/workflow/express/index.ts new file mode 100644 index 0000000..6181b45 --- /dev/null +++ b/src/api/workflow/express/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ExpressVO, ExpressQuery, ExpressForm } from '@/api/workflow/express/types'; + +/** + * 查询快递列表 + * @param query + * @returns {*} + */ + +export const listExpress = (query?: ExpressQuery): AxiosPromise => { + return request({ + url: '/workflow/express/list', + method: 'get', + params: query + }); +}; + +/** + * 查询快递详细 + * @param id + */ +export const getExpress = (id: string | number): AxiosPromise => { + return request({ + url: '/workflow/express/' + id, + method: 'get' + }); +}; + +/** + * 新增快递 + * @param data + */ +export const addExpress = (data: ExpressForm): AxiosPromise => { + return request({ + url: '/workflow/express', + method: 'post', + data: data + }); +}; + +/** + * 修改快递 + * @param data + */ +export const updateExpress = (data: ExpressForm): AxiosPromise => { + return request({ + url: '/workflow/express', + method: 'put', + data: data + }); +}; + +/** + * 删除快递 + * @param id + */ +export const delExpress = (id: string | number | Array) => { + return request({ + url: '/workflow/express/' + id, + method: 'delete' + }); +}; diff --git a/src/api/workflow/express/types.ts b/src/api/workflow/express/types.ts new file mode 100644 index 0000000..aae5e97 --- /dev/null +++ b/src/api/workflow/express/types.ts @@ -0,0 +1,30 @@ +export interface ExpressVO { + id: string | number; + tripType: string; + startDate: string; + endDate: string; + tripDays: number; + budgetType?: string; + remark: string; + status?: string; +} + +export interface ExpressForm extends BaseEntity { + id?: string | number; + tripType?: string; + startDate?: string; + endDate?: string; + tripDays?: number; + tripMoney?: number; + reason?: string; + budgetType?: string; + currentProjects?: string; + remark?: string; + attachment?: string; + status?: string; +} + +export interface ExpressQuery extends PageQuery { + startExpressDays?: number; + endExpressDays?: number; +} diff --git a/src/views/workflow/businesstrip/index.vue b/src/views/workflow/businesstrip/index.vue index 320f16f..9ccc7be 100644 --- a/src/views/workflow/businesstrip/index.vue +++ b/src/views/workflow/businesstrip/index.vue @@ -3,13 +3,13 @@