diff --git a/src/api/eam/device/deviceInternalAudit/index.ts b/src/api/eam/device/deviceInternalAudit/index.ts new file mode 100644 index 0000000..ed90b3e --- /dev/null +++ b/src/api/eam/device/deviceInternalAudit/index.ts @@ -0,0 +1,59 @@ +import request from '@/config/axios' + +export interface DeviceInternalAuditVO { + id: number + number: string + describes: string + personer: string + fitOut: number + coating: number + injectionMolding: number + business: number + laboratory: number + it: number + qualityDepartment: number + materialFlow: number + moldPre: number + available: string +} + +// 查询设备内审业务说明列表 +export const getDeviceInternalAuditPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/device-internal-audit/senior', data }) + } else { + return await request.get({ url: `/eam/device-internal-audit/page`, params }) + } +} + +// 查询设备内审业务说明详情 +export const getDeviceInternalAudit = async (id: number) => { + return await request.get({ url: `/eam/device-internal-audit/get?id=` + id }) +} + +// 新增设备内审业务说明 +export const createDeviceInternalAudit = async (data: DeviceInternalAuditVO) => { + return await request.post({ url: `/eam/device-internal-audit/create`, data }) +} + +// 修改设备内审业务说明 +export const updateDeviceInternalAudit = async (data: DeviceInternalAuditVO) => { + return await request.put({ url: `/eam/device-internal-audit/update`, data }) +} + +// 删除设备内审业务说明 +export const deleteDeviceInternalAudit = async (id: number) => { + return await request.delete({ url: `/eam/device-internal-audit/delete?id=` + id }) +} + +// 导出设备内审业务说明 Excel +export const exportDeviceInternalAudit = async (params) => { + return await request.download({ url: `/eam/device-internal-audit/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/device-internal-audit/get-import-template' }) +} diff --git a/src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts b/src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts new file mode 100644 index 0000000..960cfe7 --- /dev/null +++ b/src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts @@ -0,0 +1,179 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const DeviceInternalAuditRules = reactive({ + number: [required], + personer: [required], +}) + +export const DeviceInternalAudit = useCrudSchemas(reactive([ + { + label: '内审编号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + width: 180, + fixed: 'left' + }, + }, + + { + label: '人员', + field: 'personer', + sort: 'custom', + isSearch: false, + }, + { + label: '装配', + field: 'fitOut', + sort: 'custom', + isSearch: false, + form: { + component: 'InputNumber', + } + }, + { + label: '涂装', + field: 'coating', + sort: 'custom', + isSearch: false, + form: { + component: 'InputNumber', + } + }, + { + label: '注塑', + field: 'injectionMolding', + sort: 'custom', + isSearch: false, + form: { + component: 'InputNumber', + } + }, + { + label: '商务', + field: 'business', + sort: 'custom', + isSearch: false, + form: { + component: 'InputNumber', + } + }, + { + label: '实验室', + field: 'laboratory', + sort: 'custom', + isSearch: false, + table: { + width: 150, + }, + form: { + component: 'InputNumber', + } + }, + { + label: 'IT', + field: 'it', + sort: 'custom', + isSearch: false, + form: { + component: 'InputNumber', + } + }, + { + label: '质量保障部', + field: 'qualityDepartment', + sort: 'custom', + isSearch: false, + table: { + width: 180, + }, + form: { + component: 'InputNumber', + } + }, + { + label: '物流', + field: 'materialFlow', + sort: 'custom', + isSearch: false, + form: { + component: 'InputNumber', + } + }, + { + label: '模具前期', + field: 'moldPre', + sort: 'custom', + isSearch: false, + table: { + width: 150, + }, + form: { + component: 'InputNumber', + } + }, + { + label: '描述', + field: 'describes', + sort: 'custom', + isSearch: false, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: false, + 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: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + table: { + width: 150, + }, + 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: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/device/deviceInternalAudit/index.vue b/src/views/eam/device/deviceInternalAudit/index.vue new file mode 100644 index 0000000..aee747f --- /dev/null +++ b/src/views/eam/device/deviceInternalAudit/index.vue @@ -0,0 +1,244 @@ + + +