diff --git a/src/api/qms/inspectionJob/inspectionJobMain/index.ts b/src/api/qms/inspectionJob/inspectionJobMain/index.ts index 3346beae4..9b3f59c7e 100644 --- a/src/api/qms/inspectionJob/inspectionJobMain/index.ts +++ b/src/api/qms/inspectionJob/inspectionJobMain/index.ts @@ -57,11 +57,15 @@ export const releaseInspectionJobMain = async (id) => { } // 导出检验申请 Excel export const exportInspectionJobMain = async (params) => { - return await request.download({ url: `/qms/inspection-job-main/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/qms/inspection-job-main/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/qms/inspection-job-main/export-excel`, params }) + } } // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/qms/inspection-job-main/get-import-template' }) } - \ No newline at end of file diff --git a/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts b/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts index 67ca4a31f..81ffa403e 100644 --- a/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts +++ b/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts @@ -68,6 +68,15 @@ export const exportInspectionRecordMain = async (params) => { } } +export const exportFirstInspectionRecordMain = async (params) => { + if (params.isSearch) { + const data = { ...params } + return await request.downloadPost({ url: `/qms/inspection-record-main/export-excel-first-senior`, data }) + } else { + return await request.download({ url: `/qms/inspection-record-main/export-excel-first`, params }) + } +} + // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/qms/inspection-record-main/get-import-template' }) diff --git a/src/api/qms/inspectionRequest/index.ts b/src/api/qms/inspectionRequest/index.ts index 5aaf60961..b3033bc32 100644 --- a/src/api/qms/inspectionRequest/index.ts +++ b/src/api/qms/inspectionRequest/index.ts @@ -50,7 +50,12 @@ export const deleteInspectionMain = async (id: number) => { // 导出检验申请 Excel export const exportInspectionMain = async (params) => { - return await request.download({ url: `/qms/inspection-request-main/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/qms/inspection-request-main/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/qms/inspection-request-main/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/qms/inspectionScheme/index.ts b/src/api/qms/inspectionScheme/index.ts index 53c305c2a..42a82a5fd 100644 --- a/src/api/qms/inspectionScheme/index.ts +++ b/src/api/qms/inspectionScheme/index.ts @@ -33,7 +33,12 @@ export const disableInspectionScheme = async (id: number) => { // 导出检验阶段 Excel export const exportInspectionScheme = async (params) => { - return await request.download({ url: `/qms/inspection-scheme/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/qms/inspection-scheme/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/qms/inspection-scheme/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/qms/inspectionTemplate/index.ts b/src/api/qms/inspectionTemplate/index.ts index 577fadd6f..048c705a1 100644 --- a/src/api/qms/inspectionTemplate/index.ts +++ b/src/api/qms/inspectionTemplate/index.ts @@ -38,7 +38,12 @@ export const disableInspectionTemplate = async (id: number) => { // 导出检验模版 Excel export const exportInspectionTemplate = async (params) => { - return await request.download({ url: `/qms/programme-template/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/qms/programme-template/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/qms/programme-template/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/views/qms/inspectionJob/index.vue b/src/views/qms/inspectionJob/index.vue index df041bc5b..915a4382c 100644 --- a/src/views/qms/inspectionJob/index.vue +++ b/src/views/qms/inspectionJob/index.vue @@ -180,6 +180,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ + defaultButtons.defaultExportBtn(null), defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null) // 设置 diff --git a/src/views/qms/inspectionRecord/index.vue b/src/views/qms/inspectionRecord/index.vue index 5499b9b39..5d45a6515 100644 --- a/src/views/qms/inspectionRecord/index.vue +++ b/src/views/qms/inspectionRecord/index.vue @@ -163,7 +163,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 let HeadButttondata = [ - // defaultButtons.defaultExportBtn(null), // 导出 + defaultButtons.defaultExportBtn(null), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null) // 设置 @@ -343,7 +343,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params) - download.excel(data, '备件申领记录主.xlsx') + download.excel(data, '检验记录.xlsx') } catch { } finally { exportLoading.value = false diff --git a/src/views/qms/inspectionRecordFirst/index.vue b/src/views/qms/inspectionRecordFirst/index.vue index df2442aed..2ed3dbac1 100644 --- a/src/views/qms/inspectionRecordFirst/index.vue +++ b/src/views/qms/inspectionRecordFirst/index.vue @@ -67,6 +67,7 @@ import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeat import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' + import {exportFirstInspectionRecordMain} from "@/api/qms/inspectionRecord/inspectionRecordMain"; // 采购订单 defineOptions({ name: 'InspectionRecordMain' }) @@ -207,7 +208,7 @@ const handleMainExport = async (row: any) => { // 发起导出 exportLoading.value = true tableObject.params.number = row.number - const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params) + const data = await InspectionRecordMainApi.exportFirstInspectionRecordMain(tableObject.params) download.excel(data, '首件检验记录.xlsx') } catch { } finally { @@ -223,7 +224,7 @@ const handleMainExport = async (row: any) => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params) + const data = await InspectionRecordMainApi.exportFirstInspectionRecordMain(tableObject.params) download.excel(data, '首件检验记录.xlsx') } catch { } finally { diff --git a/src/views/qms/inspectionRequest/index.vue b/src/views/qms/inspectionRequest/index.vue index 6e1351e10..c77f6e3ec 100644 --- a/src/views/qms/inspectionRequest/index.vue +++ b/src/views/qms/inspectionRequest/index.vue @@ -148,7 +148,7 @@ const { getList, setSearchParams } = tableMethods const HeadButttondata = [ defaultButtons.defaultAddBtn({ hasPermi: 'qms:inspection-request-main:create' }), // 新增 // defaultButtons.defaultImportBtn({ hasPermi: 'wms:inspectionMain:import' }), // 导入 - // defaultButtons.defaultExportBtn({ hasPermi: 'wms:inspectionMain:export' }), // 导出 + defaultButtons.defaultExportBtn(null), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null) // 设置