diff --git a/src/api/mes/dv/machinery/index.ts b/src/api/mes/dv/machinery/index.ts new file mode 100644 index 000000000..080dfff85 --- /dev/null +++ b/src/api/mes/dv/machinery/index.ts @@ -0,0 +1,51 @@ +import request from '@/config/axios' + +// MES 设备台账 VO +export interface DvMachineryVO { + id: number // 编号 + code: string // 设备编码 + name: string // 设备名称 + brand: string // 品牌 + spec: string // 规格型号 + machineryTypeId: number // 设备类型编号 + machineryTypeName: string // 设备类型名称 + workshopId: number // 所属车间编号 + workshopName: string // 所属车间名称 + status: number // 设备状态 + lastMaintenTime: Date // 最近保养时间 + lastCheckTime: Date // 最近点检时间 + remark: string // 备注 +} + +// MES 设备台账 API +export const DvMachineryApi = { + // 查询设备台账分页 + getMachineryPage: async (params: any) => { + return await request.get({ url: `/mes/dv/machinery/page`, params }) + }, + + // 查询设备台账详情 + getMachinery: async (id: number) => { + return await request.get({ url: `/mes/dv/machinery/get?id=` + id }) + }, + + // 新增设备台账 + createMachinery: async (data: DvMachineryVO) => { + return await request.post({ url: `/mes/dv/machinery/create`, data }) + }, + + // 修改设备台账 + updateMachinery: async (data: DvMachineryVO) => { + return await request.put({ url: `/mes/dv/machinery/update`, data }) + }, + + // 删除设备台账 + deleteMachinery: async (id: number) => { + return await request.delete({ url: `/mes/dv/machinery/delete?id=` + id }) + }, + + // 导出设备台账 Excel + exportMachinery: async (params: any) => { + return await request.download({ url: `/mes/dv/machinery/export-excel`, params }) + } +} diff --git a/src/api/mes/dv/machinery/type/index.ts b/src/api/mes/dv/machinery/type/index.ts new file mode 100644 index 000000000..b7f11d62e --- /dev/null +++ b/src/api/mes/dv/machinery/type/index.ts @@ -0,0 +1,45 @@ +import request from '@/config/axios' + +// MES 设备类型 VO +export interface DvMachineryTypeVO { + id: number // 编号 + parentId: number // 父类型编号 + code: string // 类型编码 + name: string // 类型名称 + sort: number // 显示排序 + status: number // 状态 + remark: string // 备注 +} + +// MES 设备类型 API +export const DvMachineryTypeApi = { + // 查询设备类型列表 + getMachineryTypeList: async (params?: any) => { + return await request.get({ url: `/mes/dv/machinery-type/list`, params }) + }, + + // 查询设备类型精简列表 + getMachineryTypeSimpleList: async () => { + return await request.get({ url: `/mes/dv/machinery-type/simple-list` }) + }, + + // 查询设备类型详情 + getMachineryType: async (id: number) => { + return await request.get({ url: `/mes/dv/machinery-type/get?id=` + id }) + }, + + // 新增设备类型 + createMachineryType: async (data: DvMachineryTypeVO) => { + return await request.post({ url: `/mes/dv/machinery-type/create`, data }) + }, + + // 修改设备类型 + updateMachineryType: async (data: DvMachineryTypeVO) => { + return await request.put({ url: `/mes/dv/machinery-type/update`, data }) + }, + + // 删除设备类型 + deleteMachineryType: async (id: number) => { + return await request.delete({ url: `/mes/dv/machinery-type/delete?id=` + id }) + } +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index c2d30c4fd..fec7359f1 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -256,6 +256,11 @@ export enum DICT_TYPE { MES_CLIENT_TYPE = 'mes_client_type', // MES 客户类型 MES_VENDOR_LEVEL = 'mes_vendor_level', // MES 供应商级别 MES_CAL_HOLIDAY_TYPE = 'mes_cal_holiday_type', // MES 假期类型 + MES_CAL_SHIFT_TYPE = 'mes_cal_shift_type', // MES 轮班方式 + MES_CAL_SHIFT_METHOD = 'mes_cal_shift_method', // MES 倒班方式 + MES_CAL_CALENDAR_TYPE = 'mes_cal_calendar_type', // MES 班组类型 + MES_CAL_PLAN_STATUS = 'mes_cal_plan_status', // MES 排班计划状态 MES_TM_TOOL_STATUS = 'mes_tm_tool_status', // MES 工具状态 - MES_TM_MAINTEN_TYPE = 'mes_tm_mainten_type' // MES 保养维护类型 + MES_TM_MAINTEN_TYPE = 'mes_tm_mainten_type', // MES 保养维护类型 + MES_DV_MACHINERY_STATUS = 'mes_dv_machinery_status' // MES 设备状态 } diff --git a/src/views/mes/dv/machinery/MachineryForm.vue b/src/views/mes/dv/machinery/MachineryForm.vue new file mode 100644 index 000000000..50615cf6d --- /dev/null +++ b/src/views/mes/dv/machinery/MachineryForm.vue @@ -0,0 +1,195 @@ + + + diff --git a/src/views/mes/dv/machinery/index.vue b/src/views/mes/dv/machinery/index.vue new file mode 100644 index 000000000..adaec45cc --- /dev/null +++ b/src/views/mes/dv/machinery/index.vue @@ -0,0 +1,264 @@ + + + + diff --git a/src/views/mes/dv/machinery/type/MachineryTypeForm.vue b/src/views/mes/dv/machinery/type/MachineryTypeForm.vue new file mode 100644 index 000000000..8a02d7e18 --- /dev/null +++ b/src/views/mes/dv/machinery/type/MachineryTypeForm.vue @@ -0,0 +1,156 @@ + + + diff --git a/src/views/mes/dv/machinery/type/index.vue b/src/views/mes/dv/machinery/type/index.vue new file mode 100644 index 000000000..843afadf6 --- /dev/null +++ b/src/views/mes/dv/machinery/type/index.vue @@ -0,0 +1,185 @@ + + + + diff --git a/src/views/mes/utils/constants.ts b/src/views/mes/utils/constants.ts index f49d53642..c8bd008b0 100644 --- a/src/views/mes/utils/constants.ts +++ b/src/views/mes/utils/constants.ts @@ -24,6 +24,13 @@ export const MesItemOrProductEnum = { } } as const +/** MES 设备状态枚举 */ +export const MesDvMachineryStatusEnum = { + RUNNING: 1, // 运行中 + STOP: 2, // 停机 + FAULT: 3 // 故障 +} + /** MES 假期类型枚举 */ export const HolidayType = { WORKDAY: 1, // 工作日