diff --git a/src/api/mes/md/workstation/index.ts b/src/api/mes/md/workstation/index.ts new file mode 100644 index 000000000..8c6cb510c --- /dev/null +++ b/src/api/mes/md/workstation/index.ts @@ -0,0 +1,156 @@ +import request from '@/config/axios' + +// TODO @AI:是不是每个 VO 独立文件;例如说 tool/ 、worker/、machine/ 等等 + +// MES 工位 VO +export interface MdWorkstationVO { + id: number // 工位编号 + code: string // 工位编码 + name: string // 工位名称 + address: string // 工位地点 + workshopId: number // 所在车间 ID + workshopName: string // 所在车间名称 + processId: number // 工序 ID + warehouseId: number // 线边库 ID + locationId: number // 库区 ID + areaId: number // 库位 ID + status: number // 状态 + remark: string // 备注 + attribute1: string + attribute2: string + attribute3: number + attribute4: number +} + +// MES 工位设备 VO +export interface MdWorkstationMachineVO { + id: number + workstationId: number // 工位 ID + machineryId: number // 设备 ID + machineryName: string // 设备名称 + machineryCode: string // 设备编码 + quantity: number // 数量 + remark: string // 备注 +} + +// MES 工位工具 VO +export interface MdWorkstationToolVO { + id: number + workstationId: number // 工位 ID + toolTypeId: number // 工具类型 ID + toolTypeName: string // 工具类型名称 + quantity: number // 数量 + remark: string // 备注 +} + +// MES 工位人员 VO +export interface MdWorkstationWorkerVO { + id: number + workstationId: number // 工位 ID + postId: number // 岗位 ID + postName: string // 岗位名称 + quantity: number // 数量 + remark: string // 备注 +} + +// MES 工位 API +export const MdWorkstationApi = { + // 查询工位分页 + getWorkstationPage: async (params: any) => { + return await request.get({ url: `/mes/md-workstation/page`, params }) + }, + + // 查询工位精简列表 + getWorkstationSimpleList: async () => { + return await request.get({ url: `/mes/md-workstation/simple-list` }) + }, + + // 查询工位详情 + getWorkstation: async (id: number) => { + return await request.get({ url: `/mes/md-workstation/get?id=` + id }) + }, + + // 新增工位 + createWorkstation: async (data: MdWorkstationVO) => { + return await request.post({ url: `/mes/md-workstation/create`, data }) + }, + + // 修改工位 + updateWorkstation: async (data: MdWorkstationVO) => { + return await request.put({ url: `/mes/md-workstation/update`, data }) + }, + + // 删除工位 + deleteWorkstation: async (id: number) => { + return await request.delete({ url: `/mes/md-workstation/delete?id=` + id }) + }, + + // 导出工位 Excel + exportWorkstation: async (params: any) => { + return await request.download({ url: `/mes/md-workstation/export-excel`, params }) + } +} + +// MES 工位设备 API +export const MdWorkstationMachineApi = { + // 查询工位设备列表 + getWorkstationMachineList: async (workstationId: number) => { + return await request.get({ url: `/mes/md-workstation-machine/list-by-workstation?workstationId=` + workstationId }) + }, + + // 新增工位设备 + createWorkstationMachine: async (data: MdWorkstationMachineVO) => { + return await request.post({ url: `/mes/md-workstation-machine/create`, data }) + }, + + // 删除工位设备 + deleteWorkstationMachine: async (id: number) => { + return await request.delete({ url: `/mes/md-workstation-machine/delete?id=` + id }) + } +} + +// MES 工位工具 API +export const MdWorkstationToolApi = { + // 查询工位工具列表 + getWorkstationToolList: async (workstationId: number) => { + return await request.get({ url: `/mes/md-workstation-tool/list-by-workstation?workstationId=` + workstationId }) + }, + + // 新增工位工具 + createWorkstationTool: async (data: MdWorkstationToolVO) => { + return await request.post({ url: `/mes/md-workstation-tool/create`, data }) + }, + + // 修改工位工具 + updateWorkstationTool: async (data: MdWorkstationToolVO) => { + return await request.put({ url: `/mes/md-workstation-tool/update`, data }) + }, + + // 删除工位工具 + deleteWorkstationTool: async (id: number) => { + return await request.delete({ url: `/mes/md-workstation-tool/delete?id=` + id }) + } +} + +// MES 工位人员 API +export const MdWorkstationWorkerApi = { + // 查询工位人员列表 + getWorkstationWorkerList: async (workstationId: number) => { + return await request.get({ url: `/mes/md-workstation-worker/list-by-workstation?workstationId=` + workstationId }) + }, + + // 新增工位人员 + createWorkstationWorker: async (data: MdWorkstationWorkerVO) => { + return await request.post({ url: `/mes/md-workstation-worker/create`, data }) + }, + + // 修改工位人员 + updateWorkstationWorker: async (data: MdWorkstationWorkerVO) => { + return await request.put({ url: `/mes/md-workstation-worker/update`, data }) + }, + + // 删除工位人员 + deleteWorkstationWorker: async (id: number) => { + return await request.delete({ url: `/mes/md-workstation-worker/delete?id=` + id }) + } +} diff --git a/src/api/mes/md/workstation/workshop.ts b/src/api/mes/md/workstation/workshop.ts new file mode 100644 index 000000000..c45b6b462 --- /dev/null +++ b/src/api/mes/md/workstation/workshop.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +// TODO @AI:是不是独立文件夹 + +// MES 车间 VO +export interface MdWorkshopVO { + id: number // 车间编号 + code: string // 车间编码 + name: string // 车间名称 + area: number // 面积 + chargeUserId: number // 负责人用户编号 + chargeUserName: string // 负责人名称 + status: number // 状态 + remark: string // 备注 + attribute1: string // 预留字段1 + attribute2: string // 预留字段2 + attribute3: number // 预留字段3 + attribute4: number // 预留字段4 +} + +// MES 车间 API +export const MdWorkshopApi = { + // 查询车间分页 + getWorkshopPage: async (params: any) => { + return await request.get({ url: `/mes/md-workshop/page`, params }) + }, + + // 查询车间精简列表 + getWorkshopSimpleList: async () => { + return await request.get({ url: `/mes/md-workshop/simple-list` }) + }, + + // 查询车间详情 + getWorkshop: async (id: number) => { + return await request.get({ url: `/mes/md-workshop/get?id=` + id }) + }, + + // 新增车间 + createWorkshop: async (data: MdWorkshopVO) => { + return await request.post({ url: `/mes/md-workshop/create`, data }) + }, + + // 修改车间 + updateWorkshop: async (data: MdWorkshopVO) => { + return await request.put({ url: `/mes/md-workshop/update`, data }) + }, + + // 删除车间 + deleteWorkshop: async (id: number) => { + return await request.delete({ url: `/mes/md-workshop/delete?id=` + id }) + }, + + // 导出车间 Excel + exportWorkshop: async (params: any) => { + return await request.download({ url: `/mes/md-workshop/export-excel`, params }) + } +} diff --git a/src/views/mes/md/workstation/WorkstationForm.vue b/src/views/mes/md/workstation/WorkstationForm.vue new file mode 100644 index 000000000..7bcedd6e6 --- /dev/null +++ b/src/views/mes/md/workstation/WorkstationForm.vue @@ -0,0 +1,186 @@ + + diff --git a/src/views/mes/md/workstation/components/WorkstationMachinePanel.vue b/src/views/mes/md/workstation/components/WorkstationMachinePanel.vue new file mode 100644 index 000000000..93de05bdb --- /dev/null +++ b/src/views/mes/md/workstation/components/WorkstationMachinePanel.vue @@ -0,0 +1,114 @@ + + + diff --git a/src/views/mes/md/workstation/components/WorkstationToolPanel.vue b/src/views/mes/md/workstation/components/WorkstationToolPanel.vue new file mode 100644 index 000000000..f5a3e389d --- /dev/null +++ b/src/views/mes/md/workstation/components/WorkstationToolPanel.vue @@ -0,0 +1,132 @@ + + + diff --git a/src/views/mes/md/workstation/components/WorkstationWorkerPanel.vue b/src/views/mes/md/workstation/components/WorkstationWorkerPanel.vue new file mode 100644 index 000000000..bc3a4a190 --- /dev/null +++ b/src/views/mes/md/workstation/components/WorkstationWorkerPanel.vue @@ -0,0 +1,144 @@ + + + diff --git a/src/views/mes/md/workstation/index.vue b/src/views/mes/md/workstation/index.vue new file mode 100644 index 000000000..a2d8d7983 --- /dev/null +++ b/src/views/mes/md/workstation/index.vue @@ -0,0 +1,214 @@ + + + diff --git a/src/views/mes/md/workstation/workshop/WorkshopForm.vue b/src/views/mes/md/workstation/workshop/WorkshopForm.vue new file mode 100644 index 000000000..157cc922e --- /dev/null +++ b/src/views/mes/md/workstation/workshop/WorkshopForm.vue @@ -0,0 +1,159 @@ + + diff --git a/src/views/mes/md/workstation/workshop/index.vue b/src/views/mes/md/workstation/workshop/index.vue new file mode 100644 index 000000000..dc0d8192f --- /dev/null +++ b/src/views/mes/md/workstation/workshop/index.vue @@ -0,0 +1,205 @@ + + +