diff --git a/src/api/oa/erp/timesheetPreAlloc/index.ts b/src/api/oa/erp/timesheetPreAlloc/index.ts new file mode 100644 index 0000000..4ed38a7 --- /dev/null +++ b/src/api/oa/erp/timesheetPreAlloc/index.ts @@ -0,0 +1,76 @@ +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 => { + return request({ + url: '/oa/erp/timesheetPreAlloc/list', + method: 'get', + params: query + }); +}; + +/** + * 查询预投工时分配详细 + * @param allocId + */ +export const getTimesheetPreAlloc = (allocId: string | number): AxiosPromise => { + 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) => { + 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 + }); +}; diff --git a/src/api/oa/erp/timesheetPreAlloc/types.ts b/src/api/oa/erp/timesheetPreAlloc/types.ts new file mode 100644 index 0000000..4d52921 --- /dev/null +++ b/src/api/oa/erp/timesheetPreAlloc/types.ts @@ -0,0 +1,231 @@ +export interface TimesheetPreAllocVO { + /** + * 分配单ID + */ + allocId: string | number; + + /** + * 分配单编号 + */ + allocCode: string; + + /** + * 月份编码(YYYYMM) + */ + monthCode: string; + + /** + * 关联月标准工时ID(erp_timesheet_standard_month) + */ + standardMonthId: string | number; + + /** + * 项目ID(备件、物流) + */ + projectId: string | number; + + /** + * 预投项目编码(冗余) + */ + projectCode: string; + + /** + * 预投项目名称(冗余) + */ + projectName: string; + + /** + * 来源预投工时合计(天,带出汇总) + */ + sourceTotalHours: number; + + /** + * 已分配合计(天) + */ + allocatedTotalHours: number; + + /** + * 涉及人数 + */ + staffCount: number; + + /** + * 单据状态(0未分配 1部分分配 2已分配) + */ + allocStatus: string; + + /** + * 是否已回写月汇总(0否 1是) + */ + appliedFlag: string; + + /** + * 回写关联的月汇总主表ID + */ + summaryId: string | number; + + /** + * 回写月汇总时间 + */ + applyTime: string; + + /** + * 备注 + */ + remark: string; + +} + +export interface TimesheetPreAllocForm extends BaseEntity { + /** + * 分配单ID + */ + allocId?: string | number; + + /** + * 分配单编号 + */ + allocCode?: string; + + /** + * 月份编码(YYYYMM) + */ + monthCode?: string; + + /** + * 关联月标准工时ID(erp_timesheet_standard_month) + */ + standardMonthId?: string | number; + + /** + * 项目ID(备件、物流) + */ + projectId?: string | number; + + /** + * 预投项目编码(冗余) + */ + projectCode?: string; + + /** + * 预投项目名称(冗余) + */ + projectName?: string; + + /** + * 来源预投工时合计(天,带出汇总) + */ + sourceTotalHours?: number; + + /** + * 已分配合计(天) + */ + allocatedTotalHours?: number; + + /** + * 涉及人数 + */ + staffCount?: number; + + /** + * 单据状态(0未分配 1部分分配 2已分配) + */ + allocStatus?: string; + + /** + * 是否已回写月汇总(0否 1是) + */ + appliedFlag?: string; + + /** + * 回写关联的月汇总主表ID + */ + summaryId?: string | number; + + /** + * 回写月汇总时间 + */ + applyTime?: string; + + /** + * 备注 + */ + remark?: string; + +} + +export interface TimesheetPreAllocQuery extends PageQuery { + + /** + * 分配单编号 + */ + allocCode?: string; + + /** + * 月份编码(YYYYMM) + */ + monthCode?: string; + + /** + * 关联月标准工时ID(erp_timesheet_standard_month) + */ + standardMonthId?: string | number; + + /** + * 项目ID(备件、物流) + */ + projectId?: string | number; + + /** + * 预投项目编码(冗余) + */ + projectCode?: string; + + /** + * 预投项目名称(冗余) + */ + projectName?: string; + + /** + * 来源预投工时合计(天,带出汇总) + */ + sourceTotalHours?: number; + + /** + * 已分配合计(天) + */ + allocatedTotalHours?: number; + + /** + * 涉及人数 + */ + staffCount?: number; + + /** + * 单据状态(0未分配 1部分分配 2已分配) + */ + allocStatus?: string; + + /** + * 是否已回写月汇总(0否 1是) + */ + appliedFlag?: string; + + /** + * 回写关联的月汇总主表ID + */ + summaryId?: string | number; + + /** + * 回写月汇总时间 + */ + applyTime?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/api/oa/erp/timesheetPreAllocDetail/index.ts b/src/api/oa/erp/timesheetPreAllocDetail/index.ts new file mode 100644 index 0000000..833fef3 --- /dev/null +++ b/src/api/oa/erp/timesheetPreAllocDetail/index.ts @@ -0,0 +1,76 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { TimesheetPreAllocDetailVO, TimesheetPreAllocDetailForm, TimesheetPreAllocDetailQuery } from '@/api/oa/erp/timesheetPreAllocDetail/types'; + +/** + * 查询预投工时分配明细列表 + * @param query + * @returns {*} + */ + +export const listTimesheetPreAllocDetail = (query?: TimesheetPreAllocDetailQuery): AxiosPromise => { + return request({ + url: '/oa/erp/timesheetPreAllocDetail/list', + method: 'get', + params: query + }); +}; + +/** + * 查询预投工时分配明细详细 + * @param allocDetailId + */ +export const getTimesheetPreAllocDetail = (allocDetailId: string | number): AxiosPromise => { + return request({ + url: '/oa/erp/timesheetPreAllocDetail/' + allocDetailId, + method: 'get' + }); +}; + +/** + * 新增预投工时分配明细 + * @param data + */ +export const addTimesheetPreAllocDetail = (data: TimesheetPreAllocDetailForm) => { + return request({ + url: '/oa/erp/timesheetPreAllocDetail', + method: 'post', + data: data + }); +}; + +/** + * 修改预投工时分配明细 + * @param data + */ +export const updateTimesheetPreAllocDetail = (data: TimesheetPreAllocDetailForm) => { + return request({ + url: '/oa/erp/timesheetPreAllocDetail', + method: 'put', + data: data + }); +}; + +/** + * 删除预投工时分配明细 + * @param allocDetailId + */ +export const delTimesheetPreAllocDetail = (allocDetailId: string | number | Array) => { + return request({ + url: '/oa/erp/timesheetPreAllocDetail/' + allocDetailId, + method: 'delete' + }); +}; + +/** + * 下拉框查询预投工时分配明细列表 + * @param query + * @returns {*} + */ +export function getErpTimesheetPreAllocDetailList (query) { + return request({ + url: '/oa/erp/timesheetPreAllocDetail/getErpTimesheetPreAllocDetailList', + method: 'get', + params: query + }); +}; diff --git a/src/api/oa/erp/timesheetPreAllocDetail/types.ts b/src/api/oa/erp/timesheetPreAllocDetail/types.ts new file mode 100644 index 0000000..c5d3026 --- /dev/null +++ b/src/api/oa/erp/timesheetPreAllocDetail/types.ts @@ -0,0 +1,171 @@ +export interface TimesheetPreAllocDetailVO { + /** + * 分配明细ID + */ + allocDetailId: string | number; + + /** + * 分配单ID + */ + allocId: string | number; + + /** + * 排序号 + */ + sortOrder: number; + + /** + * 原项目ID + */ + originalProjectId: string | number; + + /** + * 原项目编码(冗余) + */ + originalProjectCode: string; + + /** + * 原项目名称(冗余) + */ + originalProjectName: string; + + /** + * 目标实际项目ID + */ + targetProjectId: string | number; + + /** + * 目标项目编码(冗余) + */ + targetProjectCode: string; + + /** + * 目标项目名称(冗余) + */ + targetProjectName: string; + + /** + * 分配工时(天) + */ + allocHours: number; + + /** + * 备注 + */ + remark: string; + +} + +export interface TimesheetPreAllocDetailForm extends BaseEntity { + /** + * 分配明细ID + */ + allocDetailId?: string | number; + + /** + * 分配单ID + */ + allocId?: string | number; + + /** + * 排序号 + */ + sortOrder?: number; + + /** + * 原项目ID + */ + originalProjectId?: string | number; + + /** + * 原项目编码(冗余) + */ + originalProjectCode?: string; + + /** + * 原项目名称(冗余) + */ + originalProjectName?: string; + + /** + * 目标实际项目ID + */ + targetProjectId?: string | number; + + /** + * 目标项目编码(冗余) + */ + targetProjectCode?: string; + + /** + * 目标项目名称(冗余) + */ + targetProjectName?: string; + + /** + * 分配工时(天) + */ + allocHours?: number; + + /** + * 备注 + */ + remark?: string; + +} + +export interface TimesheetPreAllocDetailQuery extends PageQuery { + + /** + * 分配单ID + */ + allocId?: string | number; + + /** + * 排序号 + */ + sortOrder?: number; + + /** + * 原项目ID + */ + originalProjectId?: string | number; + + /** + * 原项目编码(冗余) + */ + originalProjectCode?: string; + + /** + * 原项目名称(冗余) + */ + originalProjectName?: string; + + /** + * 目标实际项目ID + */ + targetProjectId?: string | number; + + /** + * 目标项目编码(冗余) + */ + targetProjectCode?: string; + + /** + * 目标项目名称(冗余) + */ + targetProjectName?: string; + + /** + * 分配工时(天) + */ + allocHours?: number; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/views/oa/erp/timesheetPreAlloc/index.vue b/src/views/oa/erp/timesheetPreAlloc/index.vue new file mode 100644 index 0000000..41b61e3 --- /dev/null +++ b/src/views/oa/erp/timesheetPreAlloc/index.vue @@ -0,0 +1,405 @@ + + + diff --git a/src/views/oa/erp/timesheetPreAllocDetail/index.vue b/src/views/oa/erp/timesheetPreAllocDetail/index.vue new file mode 100644 index 0000000..19ca529 --- /dev/null +++ b/src/views/oa/erp/timesheetPreAllocDetail/index.vue @@ -0,0 +1,322 @@ + + +