diff --git a/src/api/eam/basic/deviceMaintenance/index.ts b/src/api/eam/basic/deviceMaintenance/index.ts new file mode 100644 index 0000000..1fac84d --- /dev/null +++ b/src/api/eam/basic/deviceMaintenance/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +export interface DeviceMoldItemsVO { + name: string + deviceNumber: string + type: "DEVICE" + status: string + siteId: string + available: string + concurrencyStamp: number +} + +// 查询项记录表(设备 模具 保养 维修 巡检点检)列表 +export const getDeviceMoldItemsPage = async (params) => { + params.type="DEVICE" + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/device-mold-items/senior', data }) + } else { + return await request.get({ url: `/eam/device-mold-items/page`, params }) + } +} + + +// 查询项记录表(设备 模具 保养 维修 巡检点检)详情 +export const getDeviceMoldItems = async (id: number) => { + return await request.get({ url: `/eam/device-mold-items/get?id=` + id }) +} + +// 查询供应商发票申请主详情 +export const getNumber = async (params) => { + return await request.get({ url: `/eam/device-mold-items/getNumber`, params}) +} + +// 新增项记录表(设备 模具 保养 维修 巡检点检) +export const createDeviceMoldItems = async (data: DeviceMoldItemsVO) => { + return await request.post({ url: `/eam/device-mold-items/create`, data }) +} + +// 修改项记录表(设备 模具 保养 维修 巡检点检) +export const updateDeviceMoldItems = async (data: DeviceMoldItemsVO) => { + return await request.put({ url: `/eam/device-mold-items/update`, data }) +} + +// 删除项记录表(设备 模具 保养 维修 巡检点检) +export const deleteDeviceMoldItems = async (id: number) => { + return await request.delete({ url: `/eam/device-mold-items/delete?id=` + id }) +} + +// 导出项记录表(设备 模具 保养 维修 巡检点检) Excel +export const exportDeviceMoldItems = async (params) => { + return await request.download({ url: `/eam/device-mold-items/export-excel`, params }) +} + + diff --git a/src/api/eam/basic/deviceMoldItems/index.ts b/src/api/eam/basic/moldMaintenance/index.ts similarity index 98% rename from src/api/eam/basic/deviceMoldItems/index.ts rename to src/api/eam/basic/moldMaintenance/index.ts index dbe9e9c..4081838 100644 --- a/src/api/eam/basic/deviceMoldItems/index.ts +++ b/src/api/eam/basic/moldMaintenance/index.ts @@ -3,7 +3,7 @@ import request from '@/config/axios' export interface DeviceMoldItemsVO { name: string deviceNumber: string - type: string + type: "MOLD" status: string siteId: string available: string @@ -12,6 +12,7 @@ export interface DeviceMoldItemsVO { // 查询项记录表(设备 模具 保养 维修 巡检点检)列表 export const getDeviceMoldItemsPage = async (params) => { + params.type="MOLD" if (params.isSearch) { delete params.isSearch const data = {...params} @@ -21,6 +22,7 @@ export const getDeviceMoldItemsPage = async (params) => { } } + // 查询项记录表(设备 模具 保养 维修 巡检点检)详情 export const getDeviceMoldItems = async (id: number) => { return await request.get({ url: `/eam/device-mold-items/get?id=` + id }) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 12ecc79..736e193 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -280,5 +280,6 @@ export enum DICT_TYPE { WEI_XIU_ORDER_STATUS = 'wei_xiu_order_status',//维修单状态 BASIC_STATUS = 'basic_status',//设备模具状态 CLASS_TYPE = 'class_type', // 班组类型 - INVENTORY_ACTION = 'inventory_action' //库存动作 -} + INVENTORY_ACTION = 'inventory_action', //库存动作 + MAINTENANCE_TYPE = 'maintenance_type', //保养类型 +} \ No newline at end of file diff --git a/src/views/eam/basic/maintenance/deviceMoldItems.data.ts b/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts similarity index 77% rename from src/views/eam/basic/maintenance/deviceMoldItems.data.ts rename to src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts index 945ecd0..e7fef3c 100644 --- a/src/views/eam/basic/maintenance/deviceMoldItems.data.ts +++ b/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts @@ -1,9 +1,9 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' -import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMoldItems' +import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance' // 表单校验 -export const DeviceMoldItemsRules = reactive({ +export const DeviceMaintenanceRules = reactive({ name: [required], deviceNumber: [required], type: [required], @@ -35,7 +35,7 @@ export const DeviceMOLD = useCrudSchemas(reactive([ ])) -export const DeviceMoldItems = useCrudSchemas(reactive([ +export const DeviceMaintenance = useCrudSchemas(reactive([ { label: '保养项名称', field: 'name', @@ -48,16 +48,19 @@ export const DeviceMoldItems = useCrudSchemas(reactive([ dictType: DICT_TYPE.DEVICE_MOLD_TYPE, dictClass: 'string', sort: 'custom', - isSearch: true, + isSearch: false, form: { - component: 'Select' - }, + value: 'DEVICE', + componentProps: { + disabled: true, + } + } }, { - label: '设备/模具编号', + label: '设备编号', field: 'deviceNumber', sort: 'custom', - isSearch: true, + isSearch: false, form: { // labelMessage: '信息提示说明!!!', componentProps: { @@ -74,8 +77,8 @@ export const DeviceMoldItems = useCrudSchemas(reactive([ isMainValue: false }, { key: 'type', - value: 'type', - isMainValue: true + value: "DEVICE", + isMainValue: false } ] } @@ -87,7 +90,7 @@ export const DeviceMoldItems = useCrudSchemas(reactive([ dictType: DICT_TYPE.DEVICEMOLDITEMS_STATUS, dictClass: 'string', sort: 'custom', - isSearch: true, + isSearch: false, form: { component: 'Select', value: 'MAINTAIN', @@ -96,12 +99,27 @@ export const DeviceMoldItems = useCrudSchemas(reactive([ } }, }, + { + label: '保养类型', + field: 'maintenanceType', + dictType: DICT_TYPE.MAINTENANCE_TYPE, + dictClass: 'string', + sort: 'custom', + isSearch: false, + form: { + component: 'Select', + value: 'CYCLE', + componentProps: { + disabled: true + } + }, + }, { label: '是否可用', field: 'available', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isSearch: true, + isSearch: false, isTable: true, sort: 'custom', table: { diff --git a/src/views/eam/basic/deviceMaintenance/index.vue b/src/views/eam/basic/deviceMaintenance/index.vue new file mode 100644 index 0000000..f4d5926 --- /dev/null +++ b/src/views/eam/basic/deviceMaintenance/index.vue @@ -0,0 +1,221 @@ + + + diff --git a/src/views/eam/basic/inspection/deviceMoldItems.data.ts b/src/views/eam/basic/inspection/deviceMoldItems.data.ts index 8bd6e80..6d41074 100644 --- a/src/views/eam/basic/inspection/deviceMoldItems.data.ts +++ b/src/views/eam/basic/inspection/deviceMoldItems.data.ts @@ -1,6 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' -import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMoldItems' +import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance' // 表单校验 export const DeviceMoldItemsRules = reactive({ diff --git a/src/views/eam/basic/inspection/index.vue b/src/views/eam/basic/inspection/index.vue index c557c77..fdf55b1 100644 --- a/src/views/eam/basic/inspection/index.vue +++ b/src/views/eam/basic/inspection/index.vue @@ -58,7 +58,7 @@