diff --git a/src/api/mes/cal/plan/index.ts b/src/api/mes/cal/plan/index.ts new file mode 100644 index 000000000..fc942b001 --- /dev/null +++ b/src/api/mes/cal/plan/index.ts @@ -0,0 +1,53 @@ +import request from '@/config/axios' + +// MES 排班计划 VO +export interface CalPlanVO { + id: number + code: string // 计划编码 + name: string // 计划名称 + calendarType: number // 班组类型 + startDate: number // 开始日期 + endDate: number // 结束日期 + shiftType: number // 轮班方式 + shiftMethod: number // 倒班方式 + shiftCount: number // 倒班天数 + status: number // 状态 + remark: string // 备注 + attribute1: string + attribute2: string + attribute3: number + attribute4: number +} + +// MES 排班计划 API +export const CalPlanApi = { + // 查询排班计划分页 + getPlanPage: async (params: any) => { + return await request.get({ url: `/mes/cal/plan/page`, params }) + }, + + // 查询排班计划详情 + getPlan: async (id: number) => { + return await request.get({ url: `/mes/cal/plan/get?id=` + id }) + }, + + // 新增排班计划 + createPlan: async (data: CalPlanVO) => { + return await request.post({ url: `/mes/cal/plan/create`, data }) + }, + + // 修改排班计划 + updatePlan: async (data: CalPlanVO) => { + return await request.put({ url: `/mes/cal/plan/update`, data }) + }, + + // 删除排班计划 + deletePlan: async (id: number) => { + return await request.delete({ url: `/mes/cal/plan/delete?id=` + id }) + }, + + // 导出排班计划 Excel + exportPlan: async (params: any) => { + return await request.download({ url: `/mes/cal/plan/export-excel`, params }) + } +} diff --git a/src/api/mes/cal/plan/team.ts b/src/api/mes/cal/plan/team.ts new file mode 100644 index 000000000..19e11c043 --- /dev/null +++ b/src/api/mes/cal/plan/team.ts @@ -0,0 +1,34 @@ +import request from '@/config/axios' + +// MES 计划班组关联 VO +// TODO @AI:挪到 plan/team 目录下 +export interface CalPlanTeamVO { + id: number + planId: number // 排班计划编号 + teamId: number // 班组编号 + teamCode: string // 班组编码 + teamName: string // 班组名称 + remark: string // 备注 + attribute1: string + attribute2: string + attribute3: number + attribute4: number +} + +// MES 计划班组关联 API +export const CalPlanTeamApi = { + // 查询指定排班计划的班组列表 + getPlanTeamListByPlan: async (planId: number) => { + return await request.get({ url: `/mes/cal/plan-team/list-by-plan?planId=` + planId }) + }, + + // 新增计划班组关联 + createPlanTeam: async (data: CalPlanTeamVO) => { + return await request.post({ url: `/mes/cal/plan-team/create`, data }) + }, + + // 删除计划班组关联 + deletePlanTeam: async (id: number) => { + return await request.delete({ url: `/mes/cal/plan-team/delete?id=` + id }) + } +} diff --git a/src/api/mes/cal/shift/index.ts b/src/api/mes/cal/shift/index.ts new file mode 100644 index 000000000..7b1335b8d --- /dev/null +++ b/src/api/mes/cal/shift/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +// TODO @AI:挪到 plan/shift 目录下 + +// MES 计划班次 VO +export interface CalShiftVO { + id: number + planId: number // 排班计划编号 + sort: number // 显示顺序 + name: string // 班次名称 + startTime: string // 开始时间 + endTime: string // 结束时间 + remark: string // 备注 + attribute1: string + attribute2: string + attribute3: number + attribute4: number +} + +// MES 计划班次 API +export const CalShiftApi = { + // 查询计划班次分页 + getShiftPage: async (params: any) => { + return await request.get({ url: `/mes/cal/shift/page`, params }) + }, + + // 查询计划班次详情 + getShift: async (id: number) => { + return await request.get({ url: `/mes/cal/shift/get?id=` + id }) + }, + + // 查询指定排班计划的班次列表 + getShiftListByPlan: async (planId: number) => { + return await request.get({ url: `/mes/cal/shift/list-by-plan?planId=` + planId }) + }, + + // 新增计划班次 + createShift: async (data: CalShiftVO) => { + return await request.post({ url: `/mes/cal/shift/create`, data }) + }, + + // 修改计划班次 + updateShift: async (data: CalShiftVO) => { + return await request.put({ url: `/mes/cal/shift/update`, data }) + }, + + // 删除计划班次 + deleteShift: async (id: number) => { + return await request.delete({ url: `/mes/cal/shift/delete?id=` + id }) + }, + + // 导出计划班次 Excel + exportShift: async (params: any) => { + return await request.download({ url: `/mes/cal/shift/export-excel`, params }) + } +} diff --git a/src/views/mes/cal/plan/CalPlanForm.vue b/src/views/mes/cal/plan/CalPlanForm.vue new file mode 100644 index 000000000..09fba8cb1 --- /dev/null +++ b/src/views/mes/cal/plan/CalPlanForm.vue @@ -0,0 +1,257 @@ + + + diff --git a/src/views/mes/cal/plan/CalPlanTeamPanel.vue b/src/views/mes/cal/plan/CalPlanTeamPanel.vue new file mode 100644 index 000000000..34578a625 --- /dev/null +++ b/src/views/mes/cal/plan/CalPlanTeamPanel.vue @@ -0,0 +1,134 @@ + + + + diff --git a/src/views/mes/cal/plan/CalShiftPanel.vue b/src/views/mes/cal/plan/CalShiftPanel.vue new file mode 100644 index 000000000..bd2840196 --- /dev/null +++ b/src/views/mes/cal/plan/CalShiftPanel.vue @@ -0,0 +1,179 @@ + + + diff --git a/src/views/mes/cal/plan/index.vue b/src/views/mes/cal/plan/index.vue new file mode 100644 index 000000000..cfdb37c67 --- /dev/null +++ b/src/views/mes/cal/plan/index.vue @@ -0,0 +1,230 @@ + + + diff --git a/src/views/mes/cal/shift/CalShiftForm.vue b/src/views/mes/cal/shift/CalShiftForm.vue new file mode 100644 index 000000000..18dd181c0 --- /dev/null +++ b/src/views/mes/cal/shift/CalShiftForm.vue @@ -0,0 +1,128 @@ + + + + diff --git a/src/views/mes/cal/shift/index.vue b/src/views/mes/cal/shift/index.vue new file mode 100644 index 000000000..0b75bc0b9 --- /dev/null +++ b/src/views/mes/cal/shift/index.vue @@ -0,0 +1,185 @@ + + + +