|
|
@ -80,7 +80,8 @@ import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeat |
|
|
|
|
|
|
|
|
|
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|
|
|
|
|
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
|
// 采购订单 |
|
|
|
defineOptions({ name: 'InspectionRecordMain' }) |
|
|
|
|
|
|
@ -224,19 +225,18 @@ const checkQualityReport = async (row) => { |
|
|
|
|
|
|
|
|
|
|
|
/** 列表导出按钮操作 */ |
|
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
|
const handleMainExport = async (row: any) => { |
|
|
|
try { |
|
|
|
await message.exportConfirm() |
|
|
|
// 发起导出 |
|
|
|
exportLoading.value = true |
|
|
|
loadStart() |
|
|
|
tableObject.params.number = row.number |
|
|
|
const excelTitle = ref(route.meta.title) |
|
|
|
const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params) |
|
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
exportLoading.value = false |
|
|
|
loadDone() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -247,13 +247,13 @@ const handleMainExport = async (row: any) => { |
|
|
|
// 导出的二次确认 |
|
|
|
await message.exportConfirm() |
|
|
|
// 发起导出 |
|
|
|
exportLoading.value = true |
|
|
|
const excelTitle = ref(route.meta.title) |
|
|
|
loadStart() |
|
|
|
const excelTitle = ref(route.meta.title) |
|
|
|
const data = await InspectionRecordMainApi.exportFirstInspectionRecordMain(tableObject.params) |
|
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
exportLoading.value = false |
|
|
|
loadDone() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|