diff --git a/src/api/eam/basic/moldMaintenanceConfig/index.ts b/src/api/eam/basic/moldMaintenanceConfig/index.ts new file mode 100644 index 0000000..bc05e86 --- /dev/null +++ b/src/api/eam/basic/moldMaintenanceConfig/index.ts @@ -0,0 +1,46 @@ +import request from '@/config/axios' + +export interface MoldMaintenanceConfigVO { + deviceNumber: string +} + +// 查询设备模具保养项配置列表 +export const getMoldMaintenanceConfigPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/device-mold-maintenance-config/senior', data }) + } else { + return await request.get({ url: `/eam/device-mold-maintenance-config/page`, params }) + } +} + +// 查询设备模具保养项配置详情 +export const getMoldMaintenanceConfig = async (id: number) => { + return await request.get({ url: `/eam/device-mold-maintenance-config/get?id=` + id }) +} + +// 新增设备模具保养项配置 +export const createMoldMaintenanceConfig = async (data: MoldMaintenanceConfigVO) => { + return await request.post({ url: `/eam/device-mold-maintenance-config/create`, data }) +} + +// 修改设备模具保养项配置 +export const updateMoldMaintenanceConfig = async (data: MoldMaintenanceConfigVO) => { + return await request.put({ url: `/eam/device-mold-maintenance-config/update`, data }) +} + +// 删除设备模具保养项配置 +export const deleteMoldMaintenanceConfig = async (id: number) => { + return await request.delete({ url: `/eam/device-mold-maintenance-config/delete?id=` + id }) +} + +// 导出设备模具保养项配置 Excel +export const exportMoldMaintenanceConfig = async (params) => { + return await request.download({ url: `/eam/device-mold-maintenance-config/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/device-mold-maintenance-config/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts b/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts index 7229fbb..bd060d6 100644 --- a/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts +++ b/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts @@ -70,41 +70,41 @@ export const DeviceMaintenance = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, }, - { - label: '设备编号', - field: 'deviceNumber', - sort: 'custom', - isSearch: false, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择单号', // 输入框占位文本 - searchField: 'number', // 查询弹窗赋值字段 - searchTitle: '单号信息', // 查询弹窗标题 - searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类 - searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法 - searchCondition: [ - { - key: 'available', - value: "TRUE", - isMainValue: false - }, { - key: 'type', - value: "DEVICE", - isMainValue: false - } - ] - } - } - }, - { - label: '设备名称', - field: 'deviceName', - sort: 'custom', - isSearch: true, - isForm: false, - }, + // { + // label: '设备编号', + // field: 'deviceNumber', + // sort: 'custom', + // isSearch: false, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择单号', // 输入框占位文本 + // searchField: 'number', // 查询弹窗赋值字段 + // searchTitle: '单号信息', // 查询弹窗标题 + // searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类 + // searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法 + // searchCondition: [ + // { + // key: 'available', + // value: "TRUE", + // isMainValue: false + // }, { + // key: 'type', + // value: "DEVICE", + // isMainValue: false + // } + // ] + // } + // } + // }, + // { + // label: '设备名称', + // field: 'deviceName', + // sort: 'custom', + // isSearch: true, + // isForm: false, + // }, { label: '项类型', field: 'status', @@ -120,17 +120,17 @@ export const DeviceMaintenance = useCrudSchemas(reactive([ } }, }, - { - label: '保养周期', - field: 'executionCycle', - dictType: DICT_TYPE.EXECUTION_CYCLE, - dictClass: 'string', - sort: 'custom', - isSearch: false, - form: { - component: 'Select' - }, - }, + // { + // label: '保养周期', + // field: 'executionCycle', + // dictType: DICT_TYPE.EXECUTION_CYCLE, + // dictClass: 'string', + // sort: 'custom', + // isSearch: false, + // form: { + // component: 'Select' + // }, + // }, // { // label: '涂装保养周期-月份', // field: 'executionCycleMonth', diff --git a/src/views/eam/basic/moldMaintenanceConfig/index.vue b/src/views/eam/basic/moldMaintenanceConfig/index.vue new file mode 100644 index 0000000..5a4a2ea --- /dev/null +++ b/src/views/eam/basic/moldMaintenanceConfig/index.vue @@ -0,0 +1,323 @@ + + + diff --git a/src/views/eam/basic/moldMaintenanceConfig/moldMaintenanceConfig.data.ts b/src/views/eam/basic/moldMaintenanceConfig/moldMaintenanceConfig.data.ts new file mode 100644 index 0000000..518176b --- /dev/null +++ b/src/views/eam/basic/moldMaintenanceConfig/moldMaintenanceConfig.data.ts @@ -0,0 +1,111 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance' + +// 表单校验 +export const MoldMaintenanceConfigRules = reactive({ + deviceNumber: [required], +}) + +export const DeviceMOLD = useCrudSchemas(reactive([ + { + label: '编号', + field: 'number', + sort: 'custom', + isForm: false, + table: { + width: 180, + fixed: 'left' + }, + + }, + { + label: '名称', + field: 'name', + sort: 'custom', + }, + { + label: '规格型号', + field: 'specification', + sort: 'custom', + }, + +])) + +export const MoldMaintenanceConfig = useCrudSchemas(reactive([ + { + label: '设备编号', + field: 'deviceNumber', + sort: 'custom', + isSearch: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择单号', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: '单号信息', // 查询弹窗标题 + searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类 + searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: "TRUE", + isMainValue: false + }, { + key: 'type', + value: "DEVICE", + isMainValue: false + } + ] + } + } + }, + { + label: '设备名称', + field: 'deviceName', + sort: 'custom', + isSearch: true, + form: { + componentProps: { + disabled: true + } + }, + }, + { + label: '保养周期', + field: 'executionCycle', + dictType: DICT_TYPE.EXECUTION_CYCLE, + dictClass: 'string', + sort: 'custom', + isSearch: false, + form: { + component: 'Select' + }, + }, + { + label: '类型', + field: 'type', + isTable: false, + isForm: false, + isSearch: false, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) + +