From a66e058b91ad2eefc0f446b4ea8262be3b174830 Mon Sep 17 00:00:00 2001 From: yejiaxing <591141169@qq.com> Date: Fri, 19 Jan 2024 17:00:10 +0800 Subject: [PATCH] =?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/deviceMoldItems/index.ts | 5 + src/utils/dict.ts | 3 + .../deviceMoldItems/deviceMoldItems.data.ts | 78 ------ .../basic/inspection/deviceMoldItems.data.ts | 134 +++++++++++ .../{deviceMoldItems => inspection}/index.vue | 7 +- .../basic/maintenance/deviceMoldItems.data.ts | 133 +++++++++++ src/views/eam/basic/maintenance/index.vue | 222 ++++++++++++++++++ 7 files changed, 498 insertions(+), 84 deletions(-) delete mode 100644 src/views/eam/basic/deviceMoldItems/deviceMoldItems.data.ts create mode 100644 src/views/eam/basic/inspection/deviceMoldItems.data.ts rename src/views/eam/basic/{deviceMoldItems => inspection}/index.vue (96%) create mode 100644 src/views/eam/basic/maintenance/deviceMoldItems.data.ts create mode 100644 src/views/eam/basic/maintenance/index.vue diff --git a/src/api/eam/basic/deviceMoldItems/index.ts b/src/api/eam/basic/deviceMoldItems/index.ts index b882112..dbe9e9c 100644 --- a/src/api/eam/basic/deviceMoldItems/index.ts +++ b/src/api/eam/basic/deviceMoldItems/index.ts @@ -26,6 +26,11 @@ 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 }) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 2763fb5..becdd3c 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -273,4 +273,7 @@ export enum DICT_TYPE { BIND_TYPE = 'bind_type', // 器具绑定类型 CONTAINER_STATUS = 'container_status', // 容器状态 LOCATION_AREA_TYPE = 'location_area_type', // 库区类型 + DEVICEMOLDITEMS_STATUS = 'devicemolditems_status', // 项类型 + DEVICE_MOLD_TYPE = 'device_mold_type', // 设备/模具类型 + } diff --git a/src/views/eam/basic/deviceMoldItems/deviceMoldItems.data.ts b/src/views/eam/basic/deviceMoldItems/deviceMoldItems.data.ts deleted file mode 100644 index a043e59..0000000 --- a/src/views/eam/basic/deviceMoldItems/deviceMoldItems.data.ts +++ /dev/null @@ -1,78 +0,0 @@ -import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter } from '@/utils/formatTime' - -// 表单校验 -export const DeviceMoldItemsRules = reactive({ - name: [required], - deviceNumber: [required], - type: [required], - status: [required], - concurrencyStamp: [required], -}) - -export const DeviceMoldItems = useCrudSchemas(reactive([ - { - label: '保养项名称', - field: 'name', - sort: 'custom', - isSearch: true, - }, - { - label: '设备模具编号', - field: 'deviceNumber', - sort: 'custom', - isSearch: true, - }, - { - label: '类型', - field: 'type', - sort: 'custom', - isSearch: true, - form: { - component: 'Select' - }, - }, - { - label: '项类型', - field: 'status', - sort: 'custom', - isSearch: true, - form: { - component: 'Select' - }, - }, - { - label: '是否可用', - field: 'available', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isSearch: true, - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - type: 'Select', - inactiveValue: 'FALSE', - disabled: true - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - } - }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' - } - } -])) diff --git a/src/views/eam/basic/inspection/deviceMoldItems.data.ts b/src/views/eam/basic/inspection/deviceMoldItems.data.ts new file mode 100644 index 0000000..8bd6e80 --- /dev/null +++ b/src/views/eam/basic/inspection/deviceMoldItems.data.ts @@ -0,0 +1,134 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMoldItems' + +// 表单校验 +export const DeviceMoldItemsRules = reactive({ + name: [required], + deviceNumber: [required], + type: [required], + status: [required], + concurrencyStamp: [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 DeviceMoldItems = useCrudSchemas(reactive([ + { + label: '保养项名称', + field: 'name', + sort: 'custom', + isSearch: true, + }, + + { + label: '类型', + field: 'type', + dictType: DICT_TYPE.DEVICE_MOLD_TYPE, + dictClass: 'string', + sort: 'custom', + isSearch: true, + form: { + component: 'Select' + }, + }, + { + label: '设备/模具编号', + field: 'deviceNumber', + sort: 'custom', + isSearch: true, + 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: 'type', + isMainValue: true + } + ] + } + } + }, + { + label: '项类型', + field: 'status', + dictType: DICT_TYPE.DEVICEMOLDITEMS_STATUS, + dictClass: 'string', + sort: 'custom', + isSearch: true, + form: { + component: 'Select', + value: 'INSPECTION', + componentProps: { + disabled: true + } + }, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + inactiveValue: 'FALSE', + disabled: true + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/basic/deviceMoldItems/index.vue b/src/views/eam/basic/inspection/index.vue similarity index 96% rename from src/views/eam/basic/deviceMoldItems/index.vue rename to src/views/eam/basic/inspection/index.vue index b6af3c2..b7697af 100644 --- a/src/views/eam/basic/deviceMoldItems/index.vue +++ b/src/views/eam/basic/inspection/index.vue @@ -53,8 +53,6 @@ - -