From 39e91bb8dce77002c034b95b547488fe36e649b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com> Date: Thu, 29 Feb 2024 08:54:47 +0800 Subject: [PATCH 1/3] =?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 --- .../eam/device/deviceInternalAudit/index.ts | 59 +++++ .../deviceInternalAudit.data.ts | 179 +++++++++++++ .../eam/device/deviceInternalAudit/index.vue | 244 ++++++++++++++++++ 3 files changed, 482 insertions(+) create mode 100644 src/api/eam/device/deviceInternalAudit/index.ts create mode 100644 src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts create mode 100644 src/views/eam/device/deviceInternalAudit/index.vue 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 @@ + + + From 87a6d28214429a90ac6920ad0bf4302aa5935f64 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 29 Feb 2024 09:34:16 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BasicForm/src/BasicForm.vue | 2 ++ .../Detail/src/DetailDeviceLedger.vue | 1 + src/components/UploadFile/src/UploadFile.vue | 20 +++++++++++++++++-- src/views/eam/device/problemSolving/index.vue | 7 +++++++ .../problemSolving/problemSolving.data.ts | 3 +-- 5 files changed, 29 insertions(+), 4 deletions(-) diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 8cc85c7..831eb70 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -380,8 +380,10 @@ const open = async (type: string, row?: any, masterParmas?: any) => { formLoading.value = true try { nextTick(() => { + console.log('row11',row) formRef.value.setValues(row) }) + } finally { formLoading.value = false } diff --git a/src/components/Detail/src/DetailDeviceLedger.vue b/src/components/Detail/src/DetailDeviceLedger.vue index 0d352d6..cf0a09a 100644 --- a/src/components/Detail/src/DetailDeviceLedger.vue +++ b/src/components/Detail/src/DetailDeviceLedger.vue @@ -594,6 +594,7 @@ const getImage = () => { if (imageParmas.value.funcCode == 'device_mould_picture') { imageFormData.value.filePathList = res } else { + console.log(444,res) fileFormData.value.filePathList = res formKey.value += 1 } diff --git a/src/components/UploadFile/src/UploadFile.vue b/src/components/UploadFile/src/UploadFile.vue index 464a54a..2047ff7 100644 --- a/src/components/UploadFile/src/UploadFile.vue +++ b/src/components/UploadFile/src/UploadFile.vue @@ -6,7 +6,7 @@ name="file" v-model="valueRef" v-model:file-list="fileList" - :show-file-list="true" + :show-file-list="isShowFileList" :auto-upload="autoUpload" :action="updateUrl" :headers="uploadHeaders" @@ -28,6 +28,7 @@
格式为 {{ fileType.join('/') }} 的文件
+