From f64c2fe9d281da1c580ec1e8d1f4815cff802b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com> Date: Fri, 1 Mar 2024 08:52:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/basic/deviceMaintenance/index.ts | 5 ++ src/api/eam/basic/inspection/index.ts | 61 +++++++++++++++ src/api/eam/basic/moldMaintenance/index.ts | 5 ++ src/api/eam/item/itemAccounts/index.ts | 7 +- .../deviceMaintenance.data.ts | 4 +- src/views/eam/basic/inspection/index.vue | 4 +- ...ceMoldItems.data.ts => inspection.data.ts} | 14 ++-- src/views/eam/basic/item/index.vue | 3 - src/views/eam/item/itemAccounts/index.vue | 76 ++++++++++++++++++- .../item/itemOrderMain/itemOrderMain.data.ts | 26 +++++-- 10 files changed, 185 insertions(+), 20 deletions(-) create mode 100644 src/api/eam/basic/inspection/index.ts rename src/views/eam/basic/inspection/{deviceMoldItems.data.ts => inspection.data.ts} (97%) diff --git a/src/api/eam/basic/deviceMaintenance/index.ts b/src/api/eam/basic/deviceMaintenance/index.ts index 1fac84d..2b4a946 100644 --- a/src/api/eam/basic/deviceMaintenance/index.ts +++ b/src/api/eam/basic/deviceMaintenance/index.ts @@ -13,6 +13,7 @@ export interface DeviceMoldItemsVO { // 查询项记录表(设备 模具 保养 维修 巡检点检)列表 export const getDeviceMoldItemsPage = async (params) => { params.type="DEVICE" + params.status="MAINTAIN" if (params.isSearch) { delete params.isSearch const data = {...params} @@ -35,11 +36,15 @@ export const getNumber = async (params) => { // 新增项记录表(设备 模具 保养 维修 巡检点检) export const createDeviceMoldItems = async (data: DeviceMoldItemsVO) => { + data.type="DEVICE" + data.status="MAINTAIN" return await request.post({ url: `/eam/device-mold-items/create`, data }) } // 修改项记录表(设备 模具 保养 维修 巡检点检) export const updateDeviceMoldItems = async (data: DeviceMoldItemsVO) => { + data.type="DEVICE" + data.status="MAINTAIN" return await request.put({ url: `/eam/device-mold-items/update`, data }) } diff --git a/src/api/eam/basic/inspection/index.ts b/src/api/eam/basic/inspection/index.ts new file mode 100644 index 0000000..c1eaafb --- /dev/null +++ b/src/api/eam/basic/inspection/index.ts @@ -0,0 +1,61 @@ +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" + params.status="INSPECTION" + 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) => { + data.type="DEVICE" + data.status="INSPECTION" + return await request.post({ url: `/eam/device-mold-items/create`, data }) +} + +// 修改项记录表(设备 模具 保养 维修 巡检点检) +export const updateDeviceMoldItems = async (data: DeviceMoldItemsVO) => { + data.type="DEVICE" + data.status="INSPECTION" + 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/moldMaintenance/index.ts b/src/api/eam/basic/moldMaintenance/index.ts index 4081838..058610a 100644 --- a/src/api/eam/basic/moldMaintenance/index.ts +++ b/src/api/eam/basic/moldMaintenance/index.ts @@ -13,6 +13,7 @@ export interface DeviceMoldItemsVO { // 查询项记录表(设备 模具 保养 维修 巡检点检)列表 export const getDeviceMoldItemsPage = async (params) => { params.type="MOLD" + params.status="MAINTAIN" if (params.isSearch) { delete params.isSearch const data = {...params} @@ -35,11 +36,15 @@ export const getNumber = async (params) => { // 新增项记录表(设备 模具 保养 维修 巡检点检) export const createDeviceMoldItems = async (data: DeviceMoldItemsVO) => { + data.type="MOLD" + data.status="MAINTAIN" return await request.post({ url: `/eam/device-mold-items/create`, data }) } // 修改项记录表(设备 模具 保养 维修 巡检点检) export const updateDeviceMoldItems = async (data: DeviceMoldItemsVO) => { + data.type="MOLD" + data.status="MAINTAIN" return await request.put({ url: `/eam/device-mold-items/update`, data }) } diff --git a/src/api/eam/item/itemAccounts/index.ts b/src/api/eam/item/itemAccounts/index.ts index f660e47..db06aaf 100644 --- a/src/api/eam/item/itemAccounts/index.ts +++ b/src/api/eam/item/itemAccounts/index.ts @@ -49,4 +49,9 @@ export const exportItemAccounts = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/eam/item-accounts/get-import-template' }) -} \ No newline at end of file +} + +// 更改备件库位 +export const createDeviceItemBatch = async (data: Array) => { + return await request.post({url: `/rel/device-item/createBatch `, data }); +}; diff --git a/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts b/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts index 07e6783..b3498da 100644 --- a/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts +++ b/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts @@ -113,7 +113,7 @@ export const DeviceMaintenance = useCrudSchemas(reactive([ { label: '人数', - field: 'peopleNum', + field: 'peoples', sort: 'custom', isSearch: false, table: { @@ -125,7 +125,7 @@ export const DeviceMaintenance = useCrudSchemas(reactive([ }, { label: '保养所需时间(h)', - field: 'maintenanceTime', + field: 'estimatedMinutes', sort: 'custom', isSearch: false, table: { diff --git a/src/views/eam/basic/inspection/index.vue b/src/views/eam/basic/inspection/index.vue index fdf55b1..0aa208a 100644 --- a/src/views/eam/basic/inspection/index.vue +++ b/src/views/eam/basic/inspection/index.vue @@ -57,8 +57,8 @@ diff --git a/src/views/eam/item/itemLocationReplace/itemLocationReplace.data.ts b/src/views/eam/item/itemLocationReplace/itemLocationReplace.data.ts new file mode 100644 index 0000000..bebf9b7 --- /dev/null +++ b/src/views/eam/item/itemLocationReplace/itemLocationReplace.data.ts @@ -0,0 +1,62 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const ItemLocationReplaceRules = reactive({ + locationNumber: [required], + oldItemNumber: [required], + itemNumber: [required], +}) + +export const ItemLocationReplace = useCrudSchemas(reactive([ + { + label: '库位编号', + field: 'locationNumber', + sort: 'custom', + isSearch: true, + }, + + { + label: '变更前备件编号', + field: 'oldItemNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '变更后备件编号', + field: 'itemNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '描述', + field: 'describe', + sort: 'custom', + isSearch: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +]))