Browse Source

QMS导出

hella_online_20240829
zhaoyiran 3 months ago
parent
commit
16bb9b494c
  1. 8
      src/api/qms/inspectionJob/inspectionJobMain/index.ts
  2. 9
      src/api/qms/inspectionRecord/inspectionRecordMain/index.ts
  3. 7
      src/api/qms/inspectionRequest/index.ts
  4. 7
      src/api/qms/inspectionScheme/index.ts
  5. 7
      src/api/qms/inspectionTemplate/index.ts
  6. 1
      src/views/qms/inspectionJob/index.vue
  7. 4
      src/views/qms/inspectionRecord/index.vue
  8. 5
      src/views/qms/inspectionRecordFirst/index.vue
  9. 2
      src/views/qms/inspectionRequest/index.vue

8
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' })
}

9
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' })

7
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 })
}
}
// 下载用户导入模板

7
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 })
}
}
// 下载用户导入模板

7
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 })
}
}
// 下载用户导入模板

1
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) //

4
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

5
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 {

2
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) //

Loading…
Cancel
Save