Browse Source

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

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

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

@ -62,12 +62,28 @@ export const deleteInspectionRecordMain = async (id: number) => {
export const exportInspectionRecordMain = async (params) => { export const exportInspectionRecordMain = async (params) => {
if (params.isSearch) { if (params.isSearch) {
const data = { ...params } 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 { } else {
return await request.download({ url: `/qms/inspection-record-main/export-excel`, params }) 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 = () => { 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' })

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

@ -223,7 +223,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 {

Loading…
Cancel
Save