|
|
@ -93,6 +93,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
|
|
|
|
defineOptions({ name: 'ContainerManageRequest' }) |
|
|
|
|
|
|
@ -518,20 +519,21 @@ const handleExport = async () => { |
|
|
|
try { |
|
|
|
// 导出的二次确认 |
|
|
|
await message.exportConfirm() |
|
|
|
const excelTitle = ref(route.meta.title) |
|
|
|
// 发起导出 |
|
|
|
exportLoading.value = true |
|
|
|
if(routeName.value == 'ReturnContainerManageRequest'){ |
|
|
|
const data = await ContainerMainRequestApi.exportReturnContainerMainRequest(tableObject.params) |
|
|
|
download.excel(data, '器具返回申请.xlsx') |
|
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
|
}else if ( routeName.value == 'MoveContainerManageRequest') { |
|
|
|
const data = await ContainerMainRequestApi.exportMoveContainerMainRequest(tableObject.params) |
|
|
|
download.excel(data, '器具转移申请.xlsx') |
|
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
|
}else if ( routeName.value == 'DeliverContainerManageRequest') { |
|
|
|
const data = await ContainerMainRequestApi.exportDeliverContainerMainRequest(tableObject.params) |
|
|
|
download.excel(data, '器具发运申请.xlsx') |
|
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
|
}else{ |
|
|
|
const data = await ContainerMainRequestApi.exportContainerMainRequest(tableObject.params) |
|
|
|
download.excel(data, '器具管理申请.xlsx') |
|
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
|
} |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
@ -547,7 +549,7 @@ const handleImport = () => { |
|
|
|
// 导入附件弹窗所需的参数 |
|
|
|
const importTemplateData = reactive({ |
|
|
|
templateUrl: '', |
|
|
|
templateTitle: 'importFileName.xlsx' |
|
|
|
templateTitle: `【${route.meta.title}】导入模版.xlsx` |
|
|
|
}) |
|
|
|
// 导入成功之后 |
|
|
|
const importSuccess = () => { |
|
|
|