Browse Source

Merge remote-tracking branch 'origin/hella_online_20240803' into hella_online_20240803

linshi20240813
gaojs 3 months ago
parent
commit
109cdaf24e
  1. 20
      src/api/qms/inspectionRecord/inspectionRecordMain/index.ts
  2. 4
      src/views/qms/inspectionRecordFirst/index.vue

20
src/api/qms/inspectionRecord/inspectionRecordMain/index.ts

@ -27,7 +27,7 @@ export interface InspectionRecordMainVO {
export const getInspectionRecordMainPage = async (params) => {
if (params.isSearch) {
// delete params.isSearch
const data = {...params}
const data = { ...params }
return await request.post({ url: '/qms/inspection-record-main/senior', data })
} else {
return await request.get({ url: `/qms/inspection-record-main/page`, params })
@ -62,12 +62,28 @@ export const deleteInspectionRecordMain = async (id: number) => {
export const exportInspectionRecordMain = async (params) => {
if (params.isSearch) {
const data = { ...params }
return await request.downloadPost({ url: `/qms/inspection-record-main/export-excel-senior`, data })
return await request.downloadPost({
url: `/qms/inspection-record-main/export-excel-senior`,
data
})
} else {
return await request.download({ url: `/qms/inspection-record-main/export-excel`, params })
}
}
// 导出首件检验记录 Excel
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' })

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

@ -216,14 +216,14 @@ const handleMainExport = async (row: any) => {
}
/** 导出按钮操作 */
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
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 {

Loading…
Cancel
Save