diff --git a/src/api/mes/dv/checkplan/index.ts b/src/api/mes/dv/checkplan/index.ts new file mode 100644 index 000000000..3cf385be5 --- /dev/null +++ b/src/api/mes/dv/checkplan/index.ts @@ -0,0 +1,58 @@ +import request from '@/config/axios' + +// MES 点检保养方案 VO +export interface DvCheckPlanVO { + id: number // 编号 + code: string // 方案编码 + name: string // 方案名称 + type: number // 方案类型 + startDate: Date // 开始日期 + endDate: Date // 结束日期 + cycleType: number // 周期类型 + cycleCount: number // 周期数量 + status: number // 状态 + remark: string // 备注 +} + +// MES 点检保养方案 API +export const DvCheckPlanApi = { + // 查询点检保养方案分页 + getCheckPlanPage: async (params: any) => { + return await request.get({ url: `/mes/dv/check-plan/page`, params }) + }, + + // 查询点检保养方案详情 + getCheckPlan: async (id: number) => { + return await request.get({ url: `/mes/dv/check-plan/get?id=` + id }) + }, + + // 新增点检保养方案 + createCheckPlan: async (data: DvCheckPlanVO) => { + return await request.post({ url: `/mes/dv/check-plan/create`, data }) + }, + + // 修改点检保养方案 + updateCheckPlan: async (data: DvCheckPlanVO) => { + return await request.put({ url: `/mes/dv/check-plan/update`, data }) + }, + + // 启用点检保养方案 + enableCheckPlan: async (id: number) => { + return await request.put({ url: `/mes/dv/check-plan/enable?id=` + id }) + }, + + // 停用点检保养方案 + disableCheckPlan: async (id: number) => { + return await request.put({ url: `/mes/dv/check-plan/disable?id=` + id }) + }, + + // 删除点检保养方案 + deleteCheckPlan: async (id: number) => { + return await request.delete({ url: `/mes/dv/check-plan/delete?id=` + id }) + }, + + // 导出点检保养方案 Excel + exportCheckPlan: async (params: any) => { + return await request.download({ url: `/mes/dv/check-plan/export-excel`, params }) + } +} diff --git a/src/api/mes/dv/checkplan/machinery.ts b/src/api/mes/dv/checkplan/machinery.ts new file mode 100644 index 000000000..7533c6404 --- /dev/null +++ b/src/api/mes/dv/checkplan/machinery.ts @@ -0,0 +1,32 @@ +import request from '@/config/axios' + +// TODO @AI:放到 machinery/index.ts +// MES 点检保养方案设备 VO +export interface DvCheckPlanMachineryVO { + id: number + planId: number // 方案编号 + machineryId: number // 设备编号 + machineryCode: string // 设备编码 + machineryName: string // 设备名称 + machineryBrand: string // 品牌 + machinerySpec: string // 规格型号 + remark: string // 备注 +} + +// MES 点检保养方案设备 API +export const DvCheckPlanMachineryApi = { + // 查询指定方案的设备列表 + getListByPlan: async (planId: number) => { + return await request.get({ url: `/mes/dv/check-plan-machinery/list-by-plan?planId=` + planId }) + }, + + // 新增方案设备关联 + create: async (data: DvCheckPlanMachineryVO) => { + return await request.post({ url: `/mes/dv/check-plan-machinery/create`, data }) + }, + + // 删除方案设备关联 + delete: async (id: number) => { + return await request.delete({ url: `/mes/dv/check-plan-machinery/delete?id=` + id }) + } +} diff --git a/src/api/mes/dv/checkplan/subject.ts b/src/api/mes/dv/checkplan/subject.ts new file mode 100644 index 000000000..51d2bec97 --- /dev/null +++ b/src/api/mes/dv/checkplan/subject.ts @@ -0,0 +1,33 @@ +import request from '@/config/axios' + +// TODO @AI:放到 subject/index.ts +// MES 点检保养方案项目 VO +export interface DvCheckPlanSubjectVO { + id: number + planId: number // 方案编号 + subjectId: number // 项目编号 + subjectCode: string // 项目编码 + subjectName: string // 项目名称 + subjectType: number // 项目类型 + subjectContent: string // 项目内容 + subjectStandard: string // 标准 + remark: string // 备注 +} + +// MES 点检保养方案项目 API +export const DvCheckPlanSubjectApi = { + // 查询指定方案的项目列表 + getListByPlan: async (planId: number) => { + return await request.get({ url: `/mes/dv/check-plan-subject/list-by-plan?planId=` + planId }) + }, + + // 新增方案项目关联 + create: async (data: DvCheckPlanSubjectVO) => { + return await request.post({ url: `/mes/dv/check-plan-subject/create`, data }) + }, + + // 删除方案项目关联 + delete: async (id: number) => { + return await request.delete({ url: `/mes/dv/check-plan-subject/delete?id=` + id }) + } +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 5134004d6..1c3f69802 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -277,4 +277,8 @@ export enum DICT_TYPE { MES_QC_IQC_STATUS = 'mes_qc_iqc_status', // MES 检验单状态 MES_QC_CHECK_RESULT = 'mes_qc_check_result', // MES 检测结果 MES_QC_SOURCE_DOC_TYPE = 'mes_qc_source_doc_type', // MES 来源单据类型 + MES_DV_CYCLE_TYPE = 'mes_dv_cycle_type', // MES 点检保养周期类型 + MES_DV_CHECK_PLAN_STATUS = 'mes_dv_check_plan_status', // MES 点检保养方案状态 + MES_MAINTEN_RECORD_STATUS = 'mes_mainten_record_status', // MES 保养记录状态 + MES_MAINTEN_STATUS = 'mes_mainten_status', // MES 保养结果 } diff --git a/src/views/mes/dv/checkplan/CheckPlanForm.vue b/src/views/mes/dv/checkplan/CheckPlanForm.vue new file mode 100644 index 000000000..ed88f22cb --- /dev/null +++ b/src/views/mes/dv/checkplan/CheckPlanForm.vue @@ -0,0 +1,265 @@ + + + diff --git a/src/views/mes/dv/checkplan/CheckPlanMachineryList.vue b/src/views/mes/dv/checkplan/CheckPlanMachineryList.vue new file mode 100644 index 000000000..ac119f6d6 --- /dev/null +++ b/src/views/mes/dv/checkplan/CheckPlanMachineryList.vue @@ -0,0 +1,162 @@ + + + + diff --git a/src/views/mes/dv/checkplan/CheckPlanSubjectList.vue b/src/views/mes/dv/checkplan/CheckPlanSubjectList.vue new file mode 100644 index 000000000..423c0af6d --- /dev/null +++ b/src/views/mes/dv/checkplan/CheckPlanSubjectList.vue @@ -0,0 +1,168 @@ + + + + diff --git a/src/views/mes/dv/checkplan/index.vue b/src/views/mes/dv/checkplan/index.vue new file mode 100644 index 000000000..eb2023dbd --- /dev/null +++ b/src/views/mes/dv/checkplan/index.vue @@ -0,0 +1,260 @@ + + + diff --git a/src/views/mes/dv/subject/SubjectForm.vue b/src/views/mes/dv/subject/SubjectForm.vue index 98c0d83c6..5abe3203f 100644 --- a/src/views/mes/dv/subject/SubjectForm.vue +++ b/src/views/mes/dv/subject/SubjectForm.vue @@ -9,6 +9,7 @@ > +