Browse Source

QMS导出

hella_online_20240829
zhaoyiran 3 months ago
parent
commit
16bb9b494c
  1. 6
      src/api/qms/inspectionJob/inspectionJobMain/index.ts
  2. 9
      src/api/qms/inspectionRecord/inspectionRecordMain/index.ts
  3. 5
      src/api/qms/inspectionRequest/index.ts
  4. 5
      src/api/qms/inspectionScheme/index.ts
  5. 5
      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

6
src/api/qms/inspectionJob/inspectionJobMain/index.ts

@ -57,11 +57,15 @@ export const releaseInspectionJobMain = async (id) => {
} }
// 导出检验申请 Excel // 导出检验申请 Excel
export const exportInspectionJobMain = async (params) => { export const exportInspectionJobMain = async (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 }) return await request.download({ url: `/qms/inspection-job-main/export-excel`, params })
} }
}
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/qms/inspection-job-main/get-import-template' }) 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 = () => { export const importTemplate = () => {
return request.download({ url: '/qms/inspection-record-main/get-import-template' }) return request.download({ url: '/qms/inspection-record-main/get-import-template' })

5
src/api/qms/inspectionRequest/index.ts

@ -50,8 +50,13 @@ export const deleteInspectionMain = async (id: number) => {
// 导出检验申请 Excel // 导出检验申请 Excel
export const exportInspectionMain = async (params) => { export const exportInspectionMain = async (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 }) return await request.download({ url: `/qms/inspection-request-main/export-excel`, params })
} }
}
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {

5
src/api/qms/inspectionScheme/index.ts

@ -33,8 +33,13 @@ export const disableInspectionScheme = async (id: number) => {
// 导出检验阶段 Excel // 导出检验阶段 Excel
export const exportInspectionScheme = async (params) => { export const exportInspectionScheme = async (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 }) return await request.download({ url: `/qms/inspection-scheme/export-excel`, params })
} }
}
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {

5
src/api/qms/inspectionTemplate/index.ts

@ -38,8 +38,13 @@ export const disableInspectionTemplate = async (id: number) => {
// 导出检验模版 Excel // 导出检验模版 Excel
export const exportInspectionTemplate = async (params) => { export const exportInspectionTemplate = async (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 }) return await request.download({ url: `/qms/programme-template/export-excel`, params })
} }
}
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {

1
src/views/qms/inspectionJob/index.vue

@ -180,6 +180,7 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultExportBtn(null),
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) // defaultButtons.defaultSetBtn(null) //

4
src/views/qms/inspectionRecord/index.vue

@ -163,7 +163,7 @@ const { getList, setSearchParams } = tableMethods
// //
let HeadButttondata = [ let HeadButttondata = [
// defaultButtons.defaultExportBtn(null), // defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) // defaultButtons.defaultSetBtn(null) //
@ -343,7 +343,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params) const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params)
download.excel(data, '备件申领记录主.xlsx') download.excel(data, '检验记录.xlsx')
} catch { } catch {
} finally { } finally {
exportLoading.value = false 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 { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import {exportFirstInspectionRecordMain} from "@/api/qms/inspectionRecord/inspectionRecordMain";
// //
defineOptions({ name: 'InspectionRecordMain' }) defineOptions({ name: 'InspectionRecordMain' })
@ -207,7 +208,7 @@ const handleMainExport = async (row: any) => {
// //
exportLoading.value = true exportLoading.value = true
tableObject.params.number = row.number tableObject.params.number = row.number
const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params) const data = await InspectionRecordMainApi.exportFirstInspectionRecordMain(tableObject.params)
download.excel(data, '首件检验记录.xlsx') download.excel(data, '首件检验记录.xlsx')
} catch { } catch {
} finally { } finally {
@ -223,7 +224,7 @@ const handleMainExport = async (row: any) => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params) const data = await InspectionRecordMainApi.exportFirstInspectionRecordMain(tableObject.params)
download.excel(data, '首件检验记录.xlsx') download.excel(data, '首件检验记录.xlsx')
} catch { } catch {
} finally { } finally {

2
src/views/qms/inspectionRequest/index.vue

@ -148,7 +148,7 @@ const { getList, setSearchParams } = tableMethods
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'qms:inspection-request-main:create' }), // defaultButtons.defaultAddBtn({ hasPermi: 'qms:inspection-request-main:create' }), //
// defaultButtons.defaultImportBtn({ hasPermi: 'wms:inspectionMain:import' }), // // defaultButtons.defaultImportBtn({ hasPermi: 'wms:inspectionMain:import' }), //
// defaultButtons.defaultExportBtn({ hasPermi: 'wms:inspectionMain:export' }), // defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) // defaultButtons.defaultSetBtn(null) //

Loading…
Cancel
Save