diff --git a/src/api/oa/erp/timesheetPreAlloc/index.ts b/src/api/oa/erp/timesheetPreAlloc/index.ts index 4ed38a7..a6b6fd5 100644 --- a/src/api/oa/erp/timesheetPreAlloc/index.ts +++ b/src/api/oa/erp/timesheetPreAlloc/index.ts @@ -1,6 +1,6 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; -import { TimesheetPreAllocVO, TimesheetPreAllocForm, TimesheetPreAllocQuery } from '@/api/oa/erp/timesheetPreAlloc/types'; +import { TimesheetPreAllocVO, TimesheetPreAllocForm, TimesheetPreAllocQuery, PreAllocDetailVO } from '@/api/oa/erp/timesheetPreAlloc/types'; /** * 查询预投工时分配列表 @@ -20,13 +20,24 @@ export const listTimesheetPreAlloc = (query?: TimesheetPreAllocQuery): AxiosProm * 查询预投工时分配详细 * @param allocId */ -export const getTimesheetPreAlloc = (allocId: string | number): AxiosPromise => { +export const getTimesheetPreAlloc = (allocId: string | number): AxiosPromise => { return request({ url: '/oa/erp/timesheetPreAlloc/' + allocId, method: 'get' }); }; +/** + * 查询当前部门指定月份、来源预投项目的员工级可分配明细 + */ +export const getStaffAllocDetails = (query: { monthCode: string; projectId: string | number }): AxiosPromise => { + return request({ + url: '/oa/erp/timesheetPreAlloc/getStaffAllocDetails', + method: 'get', + params: query + }); +}; + /** * 新增预投工时分配 * @param data diff --git a/src/api/oa/erp/timesheetPreAlloc/types.ts b/src/api/oa/erp/timesheetPreAlloc/types.ts index 4d52921..262d353 100644 --- a/src/api/oa/erp/timesheetPreAlloc/types.ts +++ b/src/api/oa/erp/timesheetPreAlloc/types.ts @@ -20,7 +20,7 @@ export interface TimesheetPreAllocVO { standardMonthId: string | number; /** - * 项目ID(备件、物流) + * 来源预投项目ID */ projectId: string | number; @@ -98,7 +98,7 @@ export interface TimesheetPreAllocForm extends BaseEntity { standardMonthId?: string | number; /** - * 项目ID(备件、物流) + * 来源预投项目ID */ projectId?: string | number; @@ -152,6 +152,11 @@ export interface TimesheetPreAllocForm extends BaseEntity { */ remark?: string; + /** + * 员工级分配明细 + */ + staffAllocList?: PreAllocStaffAlloc[]; + } export interface TimesheetPreAllocQuery extends PageQuery { @@ -172,7 +177,7 @@ export interface TimesheetPreAllocQuery extends PageQuery { standardMonthId?: string | number; /** - * 项目ID(备件、物流) + * 来源预投项目ID */ projectId?: string | number; @@ -227,5 +232,71 @@ export interface TimesheetPreAllocQuery extends PageQuery { params?: any; } +export interface PreAllocTarget { + /** + * 目标实际项目ID + */ + targetProjectId?: string | number; + + /** + * 目标项目编码 + */ + targetProjectCode?: string; + + /** + * 目标项目名称 + */ + targetProjectName?: string; + + /** + * 分配工时(天) + */ + allocHours?: number; +} + +export interface PreAllocStaffAlloc { + /** + * 员工用户ID + */ + staffUserId?: string | number; + + /** + * 员工姓名 + */ + staffName?: string; + + /** + * 来源预投工时(天) + */ + sourceHours?: number; + + /** + * 已分配工时(天) + */ + allocatedHours?: number; + + /** + * 未分配工时(天) + */ + remainingHours?: number; + + /** + * 目标项目分配明细 + */ + allocItems?: PreAllocTarget[]; +} + +export interface PreAllocDetailVO extends TimesheetPreAllocVO { + /** + * 未分配工时(天) + */ + remainingTotalHours: number; + + /** + * 员工级分配明细 + */ + staffAllocList: PreAllocStaffAlloc[]; +} + diff --git a/src/views/oa/erp/timesheetPreAlloc/index.vue b/src/views/oa/erp/timesheetPreAlloc/index.vue index 41b61e3..f9e639a 100644 --- a/src/views/oa/erp/timesheetPreAlloc/index.vue +++ b/src/views/oa/erp/timesheetPreAlloc/index.vue @@ -3,60 +3,40 @@
- + - - - - - - - - - - - - - - - - - + - - + + + + - - - - - + + - - - - - - - - - - - 搜索 重置 @@ -73,64 +53,75 @@ 新增 - 修改 + + 修改 + - 删除 + 删除 + 导出 - + - - - - - - - - - - - + + + + + + + + + + + + + - - - - - + - - + + @@ -138,55 +129,106 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ dict.label }} - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +
+
+ 来源预投工时 + {{ formatHours(sourceTotalHours) }} +
+
+ 已分配工时 + {{ formatHours(allocatedTotalHours) }} +
+
+ 未分配工时 + {{ formatHours(remainingTotalHours) }} +
+
+ 涉及人数 + {{ staffCount }} +
+
+ + + + + + + + + + + + + + + + + + +