From 390b30f844bac0b8b114e82d612f68f297c88b73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=BE=E5=BA=86=E6=BA=90?= Date: Mon, 24 Feb 2025 15:11:04 +0800 Subject: [PATCH] =?UTF-8?q?[SBBJ-838][=E5=90=84=E4=B8=AA=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=8A=9F=E8=83=BD=20=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=EF=BC=9A=E5=BA=93=E4=BD=8D=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E3=80=81=E4=BE=9B=E5=BA=94=E5=95=86=E7=AE=A1=E7=90=86=E3=80=81?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E4=BF=9D=E5=85=BB=E9=A1=B9=E3=80=81=E6=A8=A1?= =?UTF-8?q?=E5=85=B7=E4=BF=9D=E5=85=BB=E9=A1=B9=E3=80=81=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=B7=A1=E6=A3=80=E7=82=B9=E6=A3=80=E9=A1=B9=E3=80=81=E6=A8=A1?= =?UTF-8?q?=E5=85=B7=E5=B7=A1=E6=A3=80=E7=82=B9=E6=A3=80=E9=A1=B9=E3=80=81?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=B9=B4=E5=BA=A6=E6=8C=87=E6=A0=87=20?= =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E8=B5=84=E4=BA=A7=EF=BC=9A=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E8=B5=84=E4=BA=A7=E7=AE=A1=E7=90=86=E3=80=81=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E5=8F=B0=E8=B4=A6=E7=AE=A1=E7=90=86=EF=BC=88=E5=B7=A5=E4=BD=8D?= =?UTF-8?q?=E5=99=A8=E5=85=B7=E7=AE=A1=E7=90=86=EF=BC=89=20=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E7=AE=A1=E7=90=86=EF=BC=9A=E8=AE=BE=E5=A4=87=E5=8F=B0?= =?UTF-8?q?=E8=B4=A6=20=E6=A8=A1=E5=85=B7=E7=AE=A1=E7=90=86=EF=BC=9A?= =?UTF-8?q?=E6=A8=A1=E5=85=B7=E5=8F=B0=E8=B4=A6]?= 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 | 4 +++ src/api/eam/basic/location/index.ts | 5 ++++ src/api/eam/basic/moldInspection/index.ts | 5 +++- .../eam/basic/moldInspectionConfig/index.ts | 6 +++- src/api/eam/basic/moldMaintenance/index.ts | 5 +++- src/api/eam/basic/supplier/index.ts | 5 ++++ src/api/eam/mold/moldAccounts/index.ts | 4 +-- src/views/eam/basic/assetsAccount/index.vue | 9 ++++-- .../eam/basic/basciYearEquipment/index.vue | 17 +++++------ .../eam/basic/deviceMaintenance/index.vue | 22 ++++++++++++++ src/views/eam/basic/fixedAssets/index.vue | 5 ++-- .../fixedAssetsControlsHistory/index.vue | 6 ++++ src/views/eam/basic/inspection/index.vue | 25 +++++++++++++++- src/views/eam/basic/location/index.vue | 25 ++++++++++++++-- src/views/eam/basic/moldInspection/index.vue | 27 +++++++++++++++++ src/views/eam/basic/moldMaintenance/index.vue | 25 ++++++++++++++++ src/views/eam/basic/supplier/index.vue | 29 ++++++++++++++++--- src/views/eam/device/deviceAccounts/index.vue | 7 +++-- src/views/eam/mold/moldAccounts/index.vue | 26 +++++++++++------ 20 files changed, 223 insertions(+), 39 deletions(-) diff --git a/src/api/eam/basic/deviceMaintenance/index.ts b/src/api/eam/basic/deviceMaintenance/index.ts index 7abfe49..2dfcc17 100644 --- a/src/api/eam/basic/deviceMaintenance/index.ts +++ b/src/api/eam/basic/deviceMaintenance/index.ts @@ -63,4 +63,9 @@ export const exportDeviceMoldItems = async (params) => { return await request.download({ url: `/eam/device-mold-items/export-excel`, params }) } +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/device-mold-items/get-import-template/DEVICE/MAINTAIN' }) +} + diff --git a/src/api/eam/basic/inspection/index.ts b/src/api/eam/basic/inspection/index.ts index 5a0ffd0..0ef7979 100644 --- a/src/api/eam/basic/inspection/index.ts +++ b/src/api/eam/basic/inspection/index.ts @@ -94,3 +94,7 @@ export const getAllByNumber = async (number: string) => { return await request.get({ url: `/eam/device-mold-items/getAllByNumber?number=` + number }) } +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/device-mold-items/get-import-template/DEVICE/INSPECTION' }) +} diff --git a/src/api/eam/basic/location/index.ts b/src/api/eam/basic/location/index.ts index 973c1a4..60b7ad1 100644 --- a/src/api/eam/basic/location/index.ts +++ b/src/api/eam/basic/location/index.ts @@ -82,6 +82,11 @@ export const getLocationNoInAccountPage = async (params) => { } +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/location/get-import-template' }) +} + diff --git a/src/api/eam/basic/moldInspection/index.ts b/src/api/eam/basic/moldInspection/index.ts index 5f5603a..9e3ac4a 100644 --- a/src/api/eam/basic/moldInspection/index.ts +++ b/src/api/eam/basic/moldInspection/index.ts @@ -59,5 +59,8 @@ export const deleteDeviceMoldItems = async (id: number, remark: string) => { export const exportDeviceMoldItems = async (params) => { return await request.download({ url: `/eam/device-mold-items/export-excel`, params }) } - +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/device-mold-items/get-import-template/MOLD/INSPECTION' }) +} diff --git a/src/api/eam/basic/moldInspectionConfig/index.ts b/src/api/eam/basic/moldInspectionConfig/index.ts index 8802672..55b7dcf 100644 --- a/src/api/eam/basic/moldInspectionConfig/index.ts +++ b/src/api/eam/basic/moldInspectionConfig/index.ts @@ -66,4 +66,8 @@ export const addMaintenanceItem = async (data: MoldMaintenanceConfigVO) => { export const delMaintenanceItem = async (data: MoldMaintenanceConfigVO) => { return await request.post({ url: `/eam/device-mold-maintenance-config/delMaintenanceItem`, data }) -} \ No newline at end of file +} +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/device-mold-items/get-import-template' }) +} diff --git a/src/api/eam/basic/moldMaintenance/index.ts b/src/api/eam/basic/moldMaintenance/index.ts index babfc29..c066a1f 100644 --- a/src/api/eam/basic/moldMaintenance/index.ts +++ b/src/api/eam/basic/moldMaintenance/index.ts @@ -64,4 +64,7 @@ export const exportDeviceMoldItems = async (params) => { return await request.download({ url: `/eam/device-mold-items/export-excel`, params }) } - +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/device-mold-items/get-import-template/MOLD/MAINTAIN' }) +} diff --git a/src/api/eam/basic/supplier/index.ts b/src/api/eam/basic/supplier/index.ts index f09e101..fcb2a4c 100644 --- a/src/api/eam/basic/supplier/index.ts +++ b/src/api/eam/basic/supplier/index.ts @@ -57,3 +57,8 @@ export const getSupplierNoPage = async (params) => { return await request.get({ url: `/eam/supplier/noPage`, params }) } +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/supplier/get-import-template' }) +} + diff --git a/src/api/eam/mold/moldAccounts/index.ts b/src/api/eam/mold/moldAccounts/index.ts index 5a76ebf..be2f9dd 100644 --- a/src/api/eam/mold/moldAccounts/index.ts +++ b/src/api/eam/mold/moldAccounts/index.ts @@ -56,8 +56,8 @@ export const exportMoldAccounts = async (params) => { } // 下载用户导入模板 -export const importTemplate = () => { - return request.download({ url: '/eam/mold-accounts/get-import-template' }) +export const importTemplate = (sourceType) => { + return request.download({ url: '/eam/mold-accounts/get-import-template/' + sourceType }) } diff --git a/src/views/eam/basic/assetsAccount/index.vue b/src/views/eam/basic/assetsAccount/index.vue index 8bc2e9c..609c0e2 100644 --- a/src/views/eam/basic/assetsAccount/index.vue +++ b/src/views/eam/basic/assetsAccount/index.vue @@ -64,8 +64,9 @@ > + - + diff --git a/src/views/eam/basic/deviceMaintenance/index.vue b/src/views/eam/basic/deviceMaintenance/index.vue index 4223d4e..0723e29 100644 --- a/src/views/eam/basic/deviceMaintenance/index.vue +++ b/src/views/eam/basic/deviceMaintenance/index.vue @@ -81,6 +81,7 @@ + diff --git a/src/views/eam/basic/fixedAssets/index.vue b/src/views/eam/basic/fixedAssets/index.vue index b6ee603..78460fb 100644 --- a/src/views/eam/basic/fixedAssets/index.vue +++ b/src/views/eam/basic/fixedAssets/index.vue @@ -65,7 +65,7 @@ - + diff --git a/src/views/eam/basic/inspection/index.vue b/src/views/eam/basic/inspection/index.vue index 9f121f1..f24c02b 100644 --- a/src/views/eam/basic/inspection/index.vue +++ b/src/views/eam/basic/inspection/index.vue @@ -81,16 +81,18 @@ + + diff --git a/src/views/eam/basic/location/index.vue b/src/views/eam/basic/location/index.vue index 37a3b2a..34d0eb2 100644 --- a/src/views/eam/basic/location/index.vue +++ b/src/views/eam/basic/location/index.vue @@ -36,8 +36,7 @@ - + diff --git a/src/views/eam/basic/moldInspection/index.vue b/src/views/eam/basic/moldInspection/index.vue index 4d7b0d8..c199335 100644 --- a/src/views/eam/basic/moldInspection/index.vue +++ b/src/views/eam/basic/moldInspection/index.vue @@ -78,6 +78,9 @@ + + + diff --git a/src/views/eam/basic/moldMaintenance/index.vue b/src/views/eam/basic/moldMaintenance/index.vue index c27c230..3d2aa89 100644 --- a/src/views/eam/basic/moldMaintenance/index.vue +++ b/src/views/eam/basic/moldMaintenance/index.vue @@ -79,6 +79,8 @@ + + @@ -89,6 +91,8 @@ import * as MoldMaintenanceApi from '@/api/eam/basic/moldMaintenance' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { useUserStore } from '@/store/modules/user' import * as DeptApi from '@/api/system/dept' +import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue"; +import * as DeviceMaintenanceApi from "@/api/eam/basic/deviceMaintenance"; const userStore = useUserStore() // 用户信息 defineOptions({ name: 'MoldMaintenance' }) @@ -157,6 +161,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ defaultButtons.defaultAddBtn({hasPermi:'basic:deviceMaintenance:create'}), // 新增 + defaultButtons.defaultImportBtn(null), // 导入 defaultButtons.defaultExportBtn({hasPermi:'basic:deviceMaintenance:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 @@ -175,6 +180,8 @@ const HeadButttondata = [ const buttonBaseClick = (val, item) => { if (val == 'add') { // 新增 openForm('create') + } else if (val == 'import') { // 导入 + handleImport() }else if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 @@ -266,6 +273,22 @@ const handleDelete = async (id: number) => { } catch {} } + +/** 导入 */ +const importFormRef = ref() +const handleImport = () => { + importFormRef.value.open() +} +// 导入附件弹窗所需的参数 +const importTemplateData = reactive({ + templateUrl: '', + templateTitle: '模具保养配置入模版.xlsx' +}) +// 导入成功之后 +const importSuccess = () => { + getList() +} + /** 导出按钮操作 */ const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { @@ -369,6 +392,8 @@ const judgeIsTheClassEngineer = (row) => { /** 初始化 **/ onMounted(async () => { getList() + importTemplateData.templateUrl = await MoldMaintenanceApi.importTemplate() + }) diff --git a/src/views/eam/basic/supplier/index.vue b/src/views/eam/basic/supplier/index.vue index 84e0e8c..b467d94 100644 --- a/src/views/eam/basic/supplier/index.vue +++ b/src/views/eam/basic/supplier/index.vue @@ -34,9 +34,8 @@ - - + + diff --git a/src/views/eam/device/deviceAccounts/index.vue b/src/views/eam/device/deviceAccounts/index.vue index 7374839..4b94ffa 100644 --- a/src/views/eam/device/deviceAccounts/index.vue +++ b/src/views/eam/device/deviceAccounts/index.vue @@ -41,8 +41,8 @@ :dialogAllSchemas="dialogAllSchemas" /> - + +